Of course, part of the reason America spends so much on the military, is because the truism that "generals always plan for the last war" ... and the last 2 major wars, the world depended on America to pull their assets out of the fire.
And that first truism, resulting in large military-industrial complex, follows with a second truism ... "if you have it, you must use it".
I mean, if we have more aircraft carriers than every other nation combined, we have to justify having that many.
Which results in America "policing" or "intimidating" the rest of the world. (depending on your viewpoint)
Of course, America can afford to do both. But that would require raising taxes, and neither side wants to do that because the majority of the American People don't want to. One side wants a strong military, and thinks healthcare should be a personal issue. The other side wants strong healthcare, and not so much military spending.