The loans that defaulted were almost all consisting of securities created by private label Investment Banks and organized into mortgage back securities. These Investment Banks were not regulated by the federal government by design due to the era of deregulation. The private label Investment Banks were able to sell these "investments", these "Mortgage Back Securities," to many organizations that were wanting security yet higher growth than traditional bonds. Thus the people that were worse by the financial collapse were the people who are required by bylaws to use safe investments ("trusts and pensions" ), foreign capital that was seeking the safety of US economy, and the investment banks themselves who had a portfolio of assets "safe assets" and "risky assets" and assumed that since the mortgage back securities were rated AAA than they must be safe assets, of course when the MBA were revealed to be junk these investment banks had to acquire capital for they discovered they were overleveraged. This is why all the investments banks were folded into traditional banking system and the various governments / banking institutions loaned money to these now "bigger banks," the banks though did not loan out the money to the businesses though for they could not, they were psychically paralyzed with fear,
Freddie and Fannie did insurasized the housing market, but they were in competition with the private label banks offering their own mortgage back securities. Freddie and Fannie bought the "safe mortgages" the ones that followed traditional rules, the private label banks got the rest of the market, the part of the market that had greater profit but was also greater risk. The private label banks in many instances though did not really own the debt they were just instead middle men who packaged the debt into a mortage back security and then sold it to another institution.
There was also Collateralized Debt Obligations (which this is a vast simplification) are insurance that if a debt does not make a certain yield the insurance company will pay up. Unlike normal insurance this was unrelegated and you didn't have to have collateral for these CDOs, this was what killed American International Group (AIG). It was the CDOs that allowed the investment banks to pretend that the shit they were selling was as safe as other AAA goods, it was the cloak to hide the emperor who in reality was really naked.
The deleveraging of 2008 is at is core a traditional bubble, the reason though it was so bad was how efficient the bubble was, we didn't know how big the bubbles was due to the securitization of all that debt. Without information the rest of the market was paralyzed. The Reserve Market Fund the oldest money market fund broke the buck and the problem escalated to the point where you couldn't borrow short term money at any price for there were a run on short term money.
We were truley fucked on the week of September 15, 2008 to September 19, 2008