The US spends substantially more on health administration than other nations. Removing that administrative burden (ie the private health insurance organizations as arbiters of health care delivery) would substantially lower the cost.
As a percentage of the GDP, the health industry is a larger proportion than military production, but as a percentage of the US Federal budget, the military consumes roughly half.
Covid response was of course badly botched in the US, but look at Germany for comparison to its single-payer neighbors. A decentralised, competitive healthcare industry is worth a lot if push comes to shove.
That said, I agree that the american healthcare market is predatory and has way too high margins. But they are only part of the "problem". Doctors make a lot more money in the US than almost anywhere else, and pharmaceutical companies often get more than half their global revenue from the US market alone.
I suspect you're only counting discretionary spending, when you should be counting all federal government spending, as important programs like Medicare are non-discretionary. Overall, the military is less than 20 percent of federal spending in the US.
As a percentage of the GDP, the health industry is a larger proportion than military production, but as a percentage of the US Federal budget, the military consumes roughly half.