Social systems exist in order to perpetuate the species. I don't mean in general - I mean for humanity. Humanity evolved the ability to form social interactions because it provided a genetic advantage. People who are capable of functioning within a social system are more likely to pass their genetic heritage on to others, and so the social structures that exist are going to reinforce the trend, and over several successive generations, only humans that are capable of functioning socially are born on a regular basis. The tendency of humans to form into social clusters (especially into clusters where the possibility of reproduction is highest) is a genetically, as opposed to memetically, induced phenomenon.
Granted, an individual is most likely to achieve reproductive success by joining a group with roughly the same memeset is his. And so people tend to like people with same ideas. This is especially important when the group of large primates is considered for its overarching evolved ability set: All large primates excel at retrieving high nutrient foods from difficult to obtain sources. A banana, for example, has a substantial amount of nutrition, but is surrounded by an inedible and roughly impenetrable peel. To get food from a banana requires climbing, plucking, and peeling abilities. Early human hunting ran on roughly the lines of how packs of wolves hunt: A pack of gamebeasts is pounced on, the weak are killed immediately, often by jumping on and strangling or gouging. The rest of the pack scatters, and the hunters attempt to rout a few into a chase that can last for days. The grazers, built for short bursts of speed, eventually keel over dead. Of course, it's simpler to get the grazer to a spot where escape is impossible, but this is only possible if members of the hunting team have prearranged pass-off points in place, and the ability to communicate necessary improvisations.
Which people hide where, who pounces initially? Someone, before each hunting session, is going to have to answer these questions. How much meat goes to which people is a different set of questions. Finally, who gets to reproduce with whom is a third set of questions. The answer to the first question ultimately forms the basis of government, while the answers for the second form markets. The third question leads to the creation of families, and more relevantly, leads to speciation, a necessary occurrence for evolution to be possible. The simplest form of government, after anarchy, is despotism. At some point either the most athletic or smartest (or both) member of a tribe begins to tell other people where to go, what roles to fill. If the new leader in the tribe is effective, then the tribe begins to feel an increase in food and is rewarded. If the leader is ineffective, then the tribe suffers. In short, the more effective the government is at governing, the more wealth becomes available to the tribe writ large. If a tribe is failing to meet its nutritional requirements, members may pull a coup and replace the despot, or democratize to some extent, or they may splinter off under a different banner.
But that wealth does not necessarily make its way into the hands of the hunters who procured it. Cooking a large beast is an undertaking, and many early tribes must have divvied the food up equally among members for no reason other than to lower overhead. Other tribes will distribute in some merit based manner, and others will simply bow to the will of the despot. If the market fails to provide food enough for all of the members of the tribe, regardless of their function, then those members of the tribe will either leave, die, or envision a method to obtain more food. Stealing, raiding trees for bananas, or making tools that improve the hunter's ability to hunt are all possibilities. Stealing creates a negative effect for the entire society, and is responded to rapidly. Engaging in a solitary foodgathering process makes the gatherer a loner, no longer involved in the social context, and lowers his reproductive likelihood. To some extent, the repercussions of those two activities have bred the activities out. The third option, creating tools or other valuable items allows the creator to engage in the social environment, attain food, and not damge his livelihood.
The tendency towards specialization, then, is as compelling as the tendency towards socialization. If the specializations are as beneficial as the initial socialization was, then the tribe gains a distinct reproductive advantage over neighboring tribes. Markets internal to a tribe begin to spring up immediately when a member takes on a useful specialization, at least if the product is one that is tradeable. If the government does not interfere (or fail to interfere, as the case may be,) then the distribution of goods becomes more equal and the amount of goods to be distributed increases. The tribe flourishes.
When the greatest technology available is stoneworking, then the specialists will be people who can carve knives and arrowheads and use the ligands of their prey to attach those blades to staves or arrows. When fire becomes available, and then metal working, the types of specialization increase. When farming becomes viable, an entire new class of person comes into being, and society can no longer function without a market more complicated than that of a simple despotism. Granaries, marketplaces and currency all serve to make the market more efficient - that is, it gets more goods to more people who actually want or need them faster. The government, if it has been growing as rapidly as the markets have, can actually interfere with the efficiency of markets. The temple may support a despot, for example, in exchange for a large chunk of the food that goes through the nearby markets. The army may requisition a large portion of the currency in case an emergency situation arises. Taxes and tithes are one form of market inefficiency. The other major form of market inefficiency occurs in the discrepancy between what buyers are willing to pay and what sellers have paid prior. The seller's markup is termed profit, and this profit occurs at every change of hands. The more inefficient a market is, the higher the opportunity for profit.
If grain requires a certain number of steps to get from where it is grown near Basra to a household in Mecca, and on each of those steps a certain amount of profit is made, means that a market is give or take so inefficient. If a merchant or inventor were to find a way to remove one step in the delivery, he could bring the grain to market at a lower price, would be making the market more efficient and would be rewarded with a larger number of customers. His profit on each step could be lower, but his overall profit be higher, based on higher volume. This is a common business method that occurs even today. Notably, it requires an improvement in technology - if the step could have been removed earlier, some cunning entrepreneur would have already done so. The other obvious thought is - why not just cut prices at each step? The reason, ultimately, is that prices have already floated to the lowest tenable level. To lower them further without some related lowering in the cost is to lower not only the individual profit, but also the overall profit, and eventually go out of business. So a good businessman might notice the new effects of irrigation, and start farming closer to Mecca. Because grain is a commodity, the price of grain in the markets of Mecca will drop, and our exemplary entrepreneur will profit while the other participants lose money. Given time, all the grainmongers of Mecca will have either adapted or gone under. This whole set of events has been beneficial to the citizens of Mecca, and an altruistic government would not have intervened in the occurrence.
If, however, one grain merchant were to put all of the rest out of business and control the entirety of the grain supply to Mecca, this would now be a dire situation. Not only is grain a necessary