Add to this the fact that the US Military is effectively a jobs program and there's little to no domestic return on that investment.
This subject gets artfully deflected by "We love our troops!" nonsense but if anybody is complaining about government spending they should be willing to look at all facets of it regardless of which side of the aisle they're on.
Not everything can be explained by budget percentages, but on the face of it redirecting military spending to other areas has not resulted in many large wins for society as a whole so far.
It likely didn't have to be this way, but we apparently are really bad at deploying tax dollars into socially meaningful infrastructure. That and there are larger factors at play.
[1] https://www.usaspending.gov/explorer/budget_function
Per the same USA Spending .gov site, military spending by year has been:
2024: $1,358,253,371,219 14.03%
2023: $1,297,012,666,574 13.90%
2022: $1,160,975,500,606 12.85%
2021: $1,117,832,172,120 11.11%
2020: $1,098,916,637,102 12.03%
2019: $1,060,561,779,405 15.97%
2018: $995,628,286,613 15.77%
2017: $931,355,381,711 15.39%
It's supposedly "the official open data source of federal spending information"