For people who want to know how crises start, oil is a pretty good case study- relevant to the housing bubble, the current Chinese collapse, student loans/for-profit Ed, and many others. The short answer is "it takes a confluence of factors" including overoptimistic industry participants, short-term oriented sources of financing and regulatory overengineering.
1) a trend that seems more sustainable than it is to industry participants (Saudis keeping oil prices high, plus production going out because of Iranian sanctions and assorted Middle East wars. For subprime, house prices remaining regionally uncorrelated. For China, rural to urban migration, low labor costs and good capital investment opportunities. Etc)
2) overly-loose financing, supported by banks in the interest of short-term loan growth and bondholders stretching for yields to fund pension payouts/endowment withdrawals/insurance claims. Allowed by state/federal gvt in the interest of something else (job growth and energy independence here, in case of subprime it was home ownership, with for-profit ed it was college access, etc)
3) key regulatory overreaches by well-meaning but not very thoughtful government officials: in this case, when you take a mineral lease in the US, you have a short amount of time (usually ~3 yrs) to have drilled in the area or the lease reverts to the government - so even companies who would have liked to be conservative stretched to drill as much as they humanly could to keep their land. Canadian cos have struggled far less because the regulatory is laxer (more time and each well secures you more area) so debt wasn't as required to keep your land.
For-profit Ed had gvt willing to guarantee 90% of student loans to promote enrollment. Subprime had gvt willing to buy loans sight unseen to promote home ownership and a bunch of requirements from the 90s that lending standards be lowered to support better economic outcomes for disadvantaged groups. China... Has a very long list :p