Think of it as a unfortunate and probably necessary side-effect of life.

Lack of war requires consistency and coherency between all parties to the degree they see themselves as 'one' (politically, economically, etc.) and have the same goals and needs, and are in agreement on how to fulfill them - or an overarching authority to enforce behavior.

For example, Civil war generally happens when an existing entity starts splitting into different political factions because the existing group can no longer agree on goals, needs, and how to fulfill them. Think of this like an animal getting cancer, where the animal is a country. When the countries central authority (think immune system) no longer is strong enough to suppress/control dissent.

War between countries happens when one country sees more benefit capturing/conquering/etc. another country than not. Like an animal killing or eating another animal for food, or territory, or just because.

In any real environment that is constantly changing, it is very difficult to have any sizable group that is consistent, happy, and has the same identity enough that they'll all individually sacrifice when necessary to make the larger group still work. Trying to do it globally with the current human condition would not be pretty.

This is especially true when you consider that all individual members within a group are susceptible to individual pathologies themselves.

Depending on how you define these groups, either we're talking individual countries, collections of countries/allied coalitions, or individual sub-states.

Almost always, some combination of 1) the group expends massive energy removing/silencing dissent, or 2) the group expends massive energy changing, with who benefits constantly changing too. Occasionally, 3) political-social identity aligns well and everyone sees it as a property of their reality, so #1 or #2 aren't necessary (very much). All existing large countries spend a lot of time and treasure on #1 though.

Think of it like the bodies immune system, with #3 being 'a very clean environment'.

So either you end up with a large political entity which wields significant power within it's borders (or is blessed with a very consistent and happy socio-economic identity for a time) to crush dissent, or has a lot of socio-economic 'churn', which rises or falls together (ahem, USSR, CCP, USA, EU, etc.), or many small ones.

Either way, these entities MUST push/pull/defend their interests - which fundamentally always don't align perfectly with others due to their varying socio-economic states and resources - including wars from time to time. The alternative is starvation from a competitor. The only alternative would be to have a larger authoritarian capability which enforces the lack of war and stasis on these various fronts. Drawing an analogy of a world like that to a zoo isn't hard.

That larger authoritarian capability would fundamentally need to be more powerful than any single actor or coalition of actors, or eventually it would be removed or overthrown via war.

'World Peace' is not just a pipe dream, it's a fantasy that it is ever anything we'd want - it would require global stasis, enforced by some kind of extreme global authoritarianism that would keep the 'have nots' in the have-not pile, and the have's in the have pile forever. Or everyone to always be happy with each other, even if that means some of them starve to death due to lack of resources (extreme brainwashing?).

World War sucks too of course, since too rapid change, churn, and turmoil sucks for everyone with massive blood spilled and treasure lost probably far in excess of what normally would occur in a bit more peaceful set of changes. It would be the natural equivalent of a massive famine or the like.