War is transspecies, and so, shouldn't be over-anthromorphicized, for example, as merely "a result of human stupidity". Other primates, particularly anthropoids, including chimpanzees engage in social warfare, as do ants, of course, amongst other species. However unpleasant, wars can't, therefore, be entirely un-natural or accidental.
Wars over resources, food and land are common across species. The Agricultural Revolution in human pre-history greatly stepped up the pace and violence of human warfare however, as it meant that large food stocks had to be preserved between seasons and could be reserved for hard times over several seasons. In times of famine these non-portable food stocks had to be defended in place, while they might mean survival to an attacking tribe that would otherwise starve. This can be seen in the pre-Columbian history and pre-history of the New World, as well as that of the Old.
The evils of "patriarchy" and caste systems are largely the effects of warfare: when a society was conquered and held by other's swords, as happened in ancient Rome, India, and China, those swords were being held captive by males, who would then appropriate most power in that society for themselves. Similarly, the second highest caste is usually the remnant population of the second-last conquering tribe or nation, and so on - with many conquests, India developed many layers of castes, with the most aboriginal population generally at the bottom.
Unfortunately, the capacity for warfare creates a "Prisoner's Dilemma" (from the mathematics of Game Theory). Those who don't dedicate themselves to warfare may not survive to pass on their peaceful wisdom or blissful serenity to other generations. (i.e., an arms race easily develops.) More positively, military needs have spurred invention and both technological and scientific progress throughout time. Galileo's calculations concerning the predictable ballistic behavior of cannonballs, and American WW II computer prototypes built to calculate artillery trajectory tables more accurately are only a couple of examples. The massive advances of neurological science during WW I (from the abundance of bizarre head wounds suffered in trench warfare) and the acceptance of penicillin and blood plasma as a result of WW II are other examples - small comfort to the dead and their kin, but an accumulating heritage for the rest of us.
It shouldn't surprise us, then, given the importance of resources (whether land, loot, or food) in motivating warfare, that genocide is historically the usual aim in war, with enslavement or other aims generally being quite secondary. The European Christian invention of defined periods of warfare without genocide as an endpoint is an aberration historically, and is not commonly shared by other cultural traditions, even today. Therefore, many other cultures don't tend to "quit when they're beaten" but continue irregular warfare without pause, since in their tradition gentlemanly ends to wars were extremely uncommon: wars simply continued until genocide or pacification by widespread death or enslavement was complete, if that was possible.
The last century has shown that democracies are more reluctant to go to war, that they rarely go to war with each other (other than civil wars and revolutions), and tend to support each other in wars. However it should be noted that none of these obvious truths were apparent to citizens of democracies at the early part of the century. However, the cost of wars to all citizens has motivated this reluctance, historically, and that cost is now in steep decline.
Warfare is becoming immensely more economically efficient, and for the most technologically advanced societies, also vastly more efficient in soldiers lives lost, as remotely piloted machines, autonomous devices, and pinpoint bomb delivery take to the field.
Barring new forms of political organization, spiritual movements, or immense technological progress in the third world; we should probably expect in the decades to come, therefore, to see that warfare is increasingly common and that democracies in particular lose their historical reluctance to engage in warfare. Instead, it seems likely that more Democratic nations will become far more warlike for the same reason that rich men date supermodels - simply because they can, and at increasingly small cost to themselves (from a historical perspective). Even wars and acts of war between democratic nations may become much more common, however lamentable.
It is common historically, for societies to complacently assume that they have evolved beyond war or forever learned better from the last "War to End All Wars". As this has never proven true in the past, we should be most wary of being complacent about the possibilities now.