Many books will tell you that money was first created because people needed an easier way to exchange one good for another. But anthropologists show us that there is evidence of money long before anyone was bartering anything at all.
Modern Money Theory explains this. It argues that a more likely explanation may be that money was created by local rulers, and forced upon their populations as a system to move resources around. To get people to use money, the ruler of a population would create some themselves, and then demanded people use to it pay taxes to his kingdom. This caused money to be in demand among the population, and initiated the concept of working for a wage.
Here is an illustration I made on how I understood this concept:
Want to read some more? I loved this paper by Randall Wray, my professor at the Levy Economics Institute: http://www.levyinstitute.org/pubs/wp_704.pdf