"Basically the Fed printed a huge amount of money. Some of that money they used to do what TARP was originally supposed to do, buy up Big Shitpile at inflated prices. Some of that money they lent to banks at basically 0 interest. Of course there were plenty of other things they could have done with 2 trillion bucks, if preserving the executive compensation at megabanks wasn't thought to be crucial for the survival of the economy. They could have dropped it from helicopters. They could have paid off mortgages directly. They could have given it to state governments. They could have bought me a SUPERTRAIN. But, no, they decided that propping up an obviously failed system of financial intermediaries was the important thing, so that's what they did."
Much has been made, for propaganda purposes, of the Big Banks (most of them, anyway) repaying loans with interest, and redeeming equity investments. As Dean Baker explains, this doesn't signify.
Bank Bailouts: Goldman's Debt to Society - CEPR:
"At the time the government made money available to the banks through TARP and even more so through the Fed, liquidity carried an enormous premium. The major banks charged each other 5 percent interest on 90 day loans because they did not have confidence in their ability to survive.
In this environment, the government stepped in and providing banks with huge amounts of money (we don't know exactly who got how much because the Fed refuses to tell us what it did with our money), at a cost far below what they would have been forced to pay in private markets. The banks could lend this money at enormous premiums or use it to just buy government bonds and pocket the difference in interest rates. As a result, most banks have been able to get back on their feet.
As a bookkeeping matter we can say that the government 'profitted' from these deals in the sense that it got interest on its loans. (It also received warrants from banks that it sold at a profit.) However, as a practical matter, these profits no more benefit the government's accounts than if the Federal Reserve Board just printed the same amount of money and handed it to the Treasury by purchasing government bonds. Unfortunately, few reporters covering the economy and the bailout understand this point, so they end up writing pieces that imply the country was somehow benefitted by the fact that the banks repaid their loans with interest."