The seeds were sown during the Clinton administration. All of the seeds had enthusiastic bipartisan support. The fair housing initiative that made mortgage loans available to low income borrowers (subprime loans) and the deregulation of banking under the Glass-Steagall Act had bipartisan support and were signed by President Clinton. These "reforms" actually penalized lenders who did not make subprime loans.
The bubble was put on steroids by the Fed's actions following 9/11. In order to prevent a recession, the Fed greatly increased liquidity in money markets. The government was promoting home ownership and providing funding at the same time. Interest rates fell to historic lows, remaining negative in real terms for long periods. The liquidity put huge amounts of cash in the hands of lenders and lenders are in the business of making loans. It is no surprise they made a lot of loans. Many of those loans were absurd.
During the same time-frame, the financial industry was creating sophisticated new securities with risk properties that no one understood! Supposedly, the innovations would compensate for the absurdity of the loans being made. Financial innovations always lead to the same boom/bust scenario, and we were not disappointed this time. The last time this happened was in the 1980s when "junk bonds" were introduced. The scenario was the same, the market grossly under-estimated the real risks associated with the new securities, and the market tanked. Once the real risks were revealed, the market began to function normally. This is precisely what happened with junk bonds, and it is eventually what will happen with subprime loans.