Our species is social, and we have a lot of adaptations designed to support cooperation. The obvious explanation is group selection: groups with those adaptations were more successful than those without. The trouble is that it is very hard for group selection to succeed. Cheating genes, which take advantage of the cooperation of others without reciprocating, seem certain to overwhelm the honest players.
This confused me for a long time, until I read Jared Diamond's "The World Until Yesterday". The key point is the large amount of inbreeding within primitive villages. Most people marry cousins, so that all the people in the village are very closely related. There is some gene transfer with neighbouring villages, but little beyond that.
Group inbreeding potentially creates a situation similar to social insects, where every individual is closely related to everyone else, and in particular to the reproducing females. This allows the group to function as the unit of evolution so that group selection can operate and cooperation evolves. So it seems obvious that this must be the normal (i.e. pre-civilization) human situation.
Of course inbreeding can be taken too far, and we see that it is natural for high status individuals to have the privilege of partnering outside the group. So how much inbreeding is there? Let me guess that a balance is maintained. Groups with too much inbreeding lose from the direct genetic cost. Group with too little inbreeding lose by failing to maintain group selection and being invaded by cheating genes.
This is non-expert speculation. However it is an important area to understand because it has obvious implications for the future of humanity. We have left our traditional lifestyle behind so quickly that the evolutionary effects have not had time to reveal themselves.
[update: "can't"=>"can". A senior moment.]
[update: It isn't that some groups have cooperation and some don't. What evolves to support groups is an instinct to suppress non-cooperation within the group. We hate freeloaders and cheats. But we need groups to have common genes from inbreeding for us to get value out of those "suppression of non-cooperation" genes. Otherwise we gain by avoiding the costs of that suppression effort. This becomes significant when we move to culture-based groups: see What is Culture for?]