Fannie and Freddie by Rep. Ron Paul Ron Paul told us about this happening - 5 years ago.
Basically, the 2 institutions Fannie and Freddie were the only institutions backed by the US Treasury. This basically gave then a line of credit in the Billions in case they ever had financial problems. This gave investors "security" to invest heavily, thus inflating the stock.
Couple that with the "no down payment" loans (given because they asserted the homes always go up in value) with easy terms to folks with no business attempting to buy a home, this is the end result.