It’s ultimately going to end up back in the account of someone that deposited it in a bank, or bought mortgage backed investments. Basically, money flows like this:
Someone invests money —> Bank uses that money to make a loan -----> Someone else gets money from the Bank as a loan
Someone repays their loan + interest ----> Bank makes some money ----> Bank pays off the person who invested the money
The breakdown at this moment is that the person who is repaying the loan isn’t paying the money back. What happens now depends on the nature of the original investment. If it is from individuals depositing money in bank accounts(i.e. savings, checking, etc.) this is what happens:
A lot of people can’t repay loan —> Bank runs out of money and goes tits up --> FDIC takes over bank —> Depositors get their money back.
The other place the money comes from is people buying investments. I go to some financial company and give them some of my money, and they issue me something basically equivalent to a stock. The company then takes my money and invests it into mortgages.
A lot of people can’t repay loan --> Investment loses some or all of its value --> Investor loses their money.
Now as to the whys and wherefores of the bailout. When I invest my money, the finance companies don’t just straight invest my money. They use it as collateral to (basically) get loans. In that way, they can maximize their gains. Basically, they get $100 from me, and borrow $900 using that as collateral. Now, if my investment goes up 1%, I earn $10 instead of $1. Normally if the above happens, the Finance company can liquidate the assets in the fund, and meet their loan obligations, and thus remain solvent and viable as a company. What is happening is that no one really knows how much the assets are worth. Assets, in this case, being the expected money that they will get back from people repaying their loans. No one is entirely sure how bad these mortgages are and thus no one will buy them. Now what happens is:
A lot of people can’t repay loan --> Investment loses some or all of its value --> Finance company can’t sell assets to meet their own obligations–> Finance company goes tits up and the investor loses their money.
The bolded part is the main problem because it leads to:
Finance Company X can’t repay loans —> Bank Y loses the money they loaned --> Bank Y doesn’t have the cash to cover those loses --> Bank Y goes tits up
Now its:
Bank Y can’t repay loans --> Finance company Z loses money on those loans --> Finance Company Z can’t cover these loses --> Finance Company Z goes tits up
That goes on until the financial system is in ruins. Even the prudent companies that avoided the bad mortgages get caught in the aftermath. That hoses the economy because businesses can’t get loans to expand, people can’t get loans to buy houses/cars, and a whole lot of people lose money.
Now with the bailout what is going to happen is:
Federal government buys loans at a discount --> Financial company loses money, but is able to meet their own obligations --> What happens here depends on how the buyouts exactly work. Investors might lose some, all, or none of their money.
Don’t think that the financial companies are going to be making money on the bailout. They are still going to lose a considerable sum on these investments, but it’s not going to be large enough to total hose them. Probably the same for investors.
As to why not just stop foreclosures, well because it doesn’t really solve the problem. There’s still no (or not enough) money going back into the system to keep it running. Plus, a whole lot of people are just going to stop paying their mortgage to take advantage of the situation.