"Wars are caused by undefended wealth." -- Douglas MacArthur
In a world partitioned into States, many of which are utterly amoral and will act as rapaciously as they can get away with, a powerful, competent military is a national survival necessity. Yes, it costs. Yes, it can tempt politicians into unjustified foreign adventurism. But the alternative -- to go unarmed and rely on the benevolence of other nations for one's continued freedom and independence -- is far worse.
Of course, we COULD do away with States -- governments -- the concept of legitimized coercive power. But who around the world is ready for that step?