We are just developing our "global civilizational immune system". Life is dangerous for humans. We can die many ways. How can we become safer?
Assume people everywhere are good, just like body tissues, but sometimes, like disease, people or a group of people "turn bad" for "no reason". The bad things, like diseases, have ways to attack the good tissues. The good things, healthy tissues, need ways to fight back against the diseases, the ways being the immune system, which needs to develop "bad ways" to get rid of the "bad tissues".
There will always be random bad things happening in the body, "for no reason", cosmic rays, aged-related decline. Immune system needs ways to get rid of bad stuff. So the immune system has to develop "bad ways" to overpower and get rid of the "bad stuff", to protect the "good stuff", the healthy tissues.
That's like society, and humanity as a whole.
Does that mean that the diseases won't steal (horizontal gene transfer, independently evolve) the same "bad ways" the immune system uses to protect the good? No. But that happens. If immune system said, "No, we can no longer protect the good tissues because our weapons against the bad may fall into the wrong hands," obviously the body would die.
It's because of our advances that many humans find "war" to be this strange, foreign, nonsensical thing. Precisely because we have been able to craft "citadels of peace", can people have this "post-urban" perspective that separates the "means of peace production" from the daily experience of people. This perspective is a historical anomaly. Everything we have today is built on a deep foundation of blood and death, which in the past, was a lot more "in the face" of everyday people.
The only accurate, historical conclusion is that weaponry and war have been a necessary and ever present part of our development.
I think one day "human global village" will evolve to where we don't want to fight or kill each other anymore. But, then, we will encounter "hostile alien species", and we will need weapons to protect us from them. Unfortunately the need for weapons and defenses is ever present.
War is just a fact of civilization, the contemporary surprise with which is a testament to how successful we have been at building civilizations that can let people feel a sense of peace. That success is based, in part, on weaponry and war.
One success of civilization is how peaceful it can become, but a major means of civilization is, war and weaponry.