Governments are fine. It's states that are the problem. Nation-states (whether ethnic or civic) especially, because they have motivations to wage war that are connected to the fiction that forms their core: "this territory is historically ours", and "you're treating our people poorly". Both are in full display in Ukraine today, but just look at any "Greater ..." article in Wikipedia to see numerous other examples.
Unless you somehow achieve global equality in all things, there's always going to be one group that wants something another group has. Combine that with democracy and you get a government that's happy to assist them with taking it.