AFAICS, the elements of warfare, from the macro- (entire countries) to the micro- (individuals) levels boil down to the drive for genetic (and memetic) replication and procreation, the "Prime Directive" of life on Earth. Life is about males seeking both access to females and the resources females seek to raise their offspring. Life is also about females themselves seeking those resources for their young, usually by becoming connected to a powerful male.
This drive to Be Fruitful and Multiply thus requires power and aggressiveness to acquire those resources.
Violence within a population is a little more complex, but still comes from the same wiring. Sometimes the wiring just goes awry. Life isn't a perfect system.
I'd say that there are aberrations, such as psychoses, in the primate brain that can spawn counterproductive violence in individuals. External pressures and stressors such as poverty can precipitate and exacerbate the aberrent behavior. Under the "right" sets of stress circumstances, a creature will gnaw its foot off. It will also kill its young. Humans are subject to the same responses under such given sets of circumstances.
But the prediliction toward war-making and genocide is not aberrant human behavior; it is part of natural primate behavior. It's recorded in the Hebrew and Christian bibles and other religious documents because it is a natural, observable part of the human condition. BTW, so is the tendency for adolescent and post-adolescent young males to form gangs and anti-social, violent groups -- political and non-political. It's all about access to resources and the power needed to acquire them. Primate species such as langurs form gangs for the same reasons. Read Hrdy's "The Langurs of Abu." Ants regularly wage war on genetically-unrelated colonies, raiding them to slaughter the residents and abscond with the eggs and larvae to raise as slave labor! So, what else is new? They've been doing it for hundreds of millions of years.
Because humans have intellect and conscious thought, we can reflect on the nature of war and suffering, and how lovely the world would be if we could live in peace for all time. But that ain't who we are. I learned that from watching Star Trek.
The Chinese also say that "you must eat bitter in order to be able to taste that which is sweet." If we didn't have wars, we wouldn't know what peace is, would we? If nothing else, being warlike gives us plenty of material for movies, poems, music and folklore.