These billions of dollars were devoted to keeping a dream alive - the accounting fictions written down by companies that had entered an unreal world based on false accounting that nearly everyone in the financial sector knew to be fake. But they played along with buying and selling packaged mortgage junk because that was where the money was. As Charles Prince of Citibank put it, "As long as they're playing music, you have to get up and dance." Even after markets collapsed, fund managers who steered clear were blamed for not playing the game while it was going. I have friends on Wall Street who were fired for not matching the returns that their compatriots were making. And the biggest returns were to be made in trading in the economy's largest financial asset - mortgage debt. The mortgages packaged, owned or guaranteed by Fannie and Freddie alone exceeded the entire U.S. national debt - the cumulative deficits run up by the American Government since the nation won the Revolutionary War!
This gives an idea of just how large the bailout has been - and where the government's (or at least the Republicans') priorities lie! Instead of waking up the economy to reality, the government has thrown all its resources to promote the unreal dream that debts can be paid - if not by the debtors themselves, then by the government - "taxpayers," as the euphemism goes.