How warfare shaped human evolution

From the newscientist.com article:
It’s a question at the heart of what it is to be human: why do we go to war? The cost to human society is enormous, yet for all our intellectual development, we continue to wage war well into the 21st century.

Now a new theory is emerging that challenges the prevailing view that warfare is a product of human culture and thus a relatively recent phenomenon. For the first time, anthropologists, archaeologists, primatologists, psychologists and political scientists are approaching a consensus. Not only is war as ancient as humankind, they say, but it has played an integral role in our evolution.

The theory helps explain the evolution of familiar aspects of warlike behaviour such as gang warfare. And even suggests the cooperative skills we’ve had to develop to be effective warriors have turned into the modern ability to work towards a common goal.
…

If group violence has been around for a long time in human society then we ought to have evolved psychological adaptations to a warlike lifestyle. Several participants presented the strongest evidence yet that males – whose larger and more muscular bodies make them better suited for fighting – have evolved a tendency towards aggression outside the group but cooperation within it. “There is something ineluctably male about coalitional aggression – men bonding with men to engage in aggression against other men,” says Rose McDermott, a political scientist at Stanford University in California.