Nation States, currently192 of them recognized by the United Nations, maintain the rights to defend themselves with military force. With lots of nations integrated close together in commerce, there's less motivation to go to war with their neighbors, making life safer. It's just expensive to upkeep a military, and offers no commercial benefit if you're feeling safe with your neighbor. Some nations back each other up with statements of mutual defense. Demilitarization occurs.