To be fair, government bailouts are not just free money the government gives large corporations with no attached expectations. When the government bailed out GM, for example, the treasury gave GM $52 billion. $6.7 billion was considered a loan (with interest) which GM has since paid back. The rest was an investment resulting in a 32% ownership of GM by the US Treasury.
It would be terrible for everyone involved, not just the economy but also for quality of life. Bailouts are bad, but not bailing out is worse. So what do we do? (Sorta) simple, legislation the prevents the amount of risks that banks are allowed to take. My proof is by counter example. The great financial crisis of 2008 was due to deregulation, mainly pushed by Regan era policy. Limits on banks force them to take their due diligence with each loan and decreases the risks of bubbles (crypto, housing, coins, etc.) forming in the first place.
Bailouts are worse. Whatever you subsidize you get more of, so if you subsidize financial mismanagement you get more of the same. It is called a preverse incentive a term I am sure your economics 101 class didn't mention for a reason. The same reason why preachers don't mention the stuff about Jesus saying to pay taxes.
It is better to let the banks fall, FDIC the accounts, and make sure the bankruptcy courts make recommendations to the AG office for criminal prosecution.
Besides which there was really no danger of AIG or Goldman folding. They lied about their financial situation. By the time it crashes they had moved all of their toxic assets into pension funds.
And there is a shit ton of people going bankrupt over medication costs, housing costs, and student loan debt. Do you care about those issue as much as you care about giving a car corporation more money to make oversized gas-guzzlers?
People like you are the reason why everyone is so broke. You care about your tribe and no one else. Did your UAW workers get a pay raise? Cool, and fuck everyone else. Give me free money
On top of this, there is arguably avoidance of a huge negatives impact on workers in GM and elsewhere. So not only the shareholders who were benefiting. And even within shareholders there are regular people, pension funds, etc. Some bailouts make sense.
No bailouts make sense ever. If you really want to give free money to people just give it to them. You don't need to make sure that their shitty employer is still shitty tomorrow.