The barter myth
It is commonly believed that before people started developing ancient forms of money for trade, they used to barter. While there is definitely some truth to this I will argue that the reality is much more nuanced.
I argued in this piece that, while socialism and capitalism are two opposed systems, they do not actually exclude each other but rather have to coexist peacefully as different layers of a healthy society.
Barter and sharing
The reason why we believe that barter was a precursor of money is that we are only looking at one side of this equation.
Barter implies quantifying the goods or services at the time the exchange happens.
Sharing is more like an unquantified debt-based exchange. I call it debt-based because you can receive more than you give back and I call it unquantified because when you share something you do not account exactly how much you shared nor you keep an exact record of this "debt".
If we think about the world from this dualist perspective it becomes clear that on the lower layers of society there were always exchanges of goods and services taking place that were not capitalistic in nature and thus not conducted using barter.
Think about a family: parents do not account how much they spend on raising their children in order to demand compensation for that later on. They simply spend as much as needed given the available resources.
As people organized themselves into tribes they used the sharing approach rather than the barter approach; the tribes behaved more like a family or an ant colony rather than a modern-day village where people go to the market to buy goods from fellow villagers. This is still visible today in tribes in Papua where the hunter goes out in the jungle for a few days and comes back with food that he shares with the whole village without being paid in any way and without even eating any of that food before sharing it with everyone.
Markets where people meet to exchange goods are probably a newer development and must have been initially places where people from different villages would meet to exchange (barter) goods not found in their respective areas rather than where people from the same community would trade.
So it is not specialization or division of labor that has to inevitably lead to barter, but rather the expanding circles of trade partners. The closer the relationship, the less the exchanges are even accurately accounted for.
Barter emerged not when people within a group started to specialize in specific crafts, but when groups of people started to trade with other groups of people.
And that is how capitalism was born.
Capitalism is what brings people from different communities together, while socialism is what keeps small communities together.