Yeah in the game theoretics of centralized nations or kingdoms militaries are necessary. At least insofar as self-defense of one group from the other most powerful / proximal groups.
But the US literally has 700+ bases globally to exert PoW on implicit subjects. I think a high-quality isolationist / defense-force would be an order of magnitude cheaper and a much more respectable / defensible system. But then the US couldn’t meddle nearly as effectively.