The largest buckets non defense buckets are social security (1.4 trillion), medicare+medicaid (~1.6 trillion), interest payments (~800 billion). Total DOD spending is like ~750 billion, and DHS is like ~100 billion. FY2023 deficit was roughly 1.7 trillion dollars
Social security and medicare together at like ~2.4 trillion dollars a year, and are supporting a population of roughly 55 million Americans (just grossly taking the 65+ age population). This works out to roughly 43k per year per 65+ adult. You can decide for yourself is this seems like the right way for the government to work.
Anyhow, I am certain there is a lot of waste, and a lot of different types of waste there.
But fundamentally, the US government is trying to do a lot of frankly difficult and gigantic tasks. The DoD is tasked with amongst other things, perpetuating American hegemony, which right now is kinda critical for the entire US government funding situation. The USG's ability to leverage USD status as the world's reserve currency to help fund expenditures is contingent on it being if not THE global hegemon, then at least amongst the world's top powers, and the hegemon (or uh... senior security partner) for a substantial fraction of the world's economy.