Secondly, America's defense is way more expensive than it needs to be due to a lot of high level corruption and lobbying from the military industrial complex profiteering when it comes to purchasing decisions, where a 10$ bag of bolts is bought by the military for 50K$, shovelings taxpayer money into the right private industry pockets. EU can achieve similar results with way less cost if it wanted to by minimizing this style of corruption but that's easier said than done. The only one rivaling America's military inefficiency is Germany who spends more than France, a nuclear power with aircraft carriers, but can't afford to issue underwear and dog tags to new conscripts.
Thirdly, America's lack of social services is not due to its powerful military, but due to political choices and inefficiencies. It could easily have better welfare if it wanted to since it can afford it with the world's largest GDP, but it chooses not to, since the current status quo is enriching a lot of private enterprises and parasites, while the concept of even more welfare is usually not a popular topic with the US voters which see welfare recipients as lazy and an unnecessary money sink funded by higher taxes on the middle class which they don't want. So their issue is social and political, not economical.