I won’t downvote, but whoever told you that was telling stories. Yes, money gets mishandled at times, and we’re currently in a period of absurd corruption, but overall governmental programs are very efficiently run compared to a lot of private sector since there’s zero need for profit.
The government is also essentially the largest negotiating body in the country for bulk rate bids.
If they need money they print it
Which is a leading cause of inflation. It’s very conservative financial behavior. Budgets need to be balanced. Republicans don’t bother and tend to leave the mess for whoever comes after. Democrats aren’t a ton better, but budgets are at least considered, and the only time we’ve ever had a surplus budget in my lifetime was under the democrats.