The fact that you can just walk away from a house in the US didn't really help either.
To clarify the policy for those elsewhere:
Once someone defaults on a loan in the US, the bank will take it back based on the fact that it is used to collateralize the loan. The home is then sold through various methods, auction being a pretty common method. The question is what to do if the amount earned from auction is different than the amount remaining on the mortgage. This is where things get complicated, and can vary from jurisdiction to jurisdiction.
For instance, if the proceeds from sale do not entirely cover the loan amount, in most states, the prior homeowner is still on the hook for the amount of the shortcoming. Only about 15 of the 50 states (mostly in the Western part of the US) have laws on the books preventing this. And even then, it isn't guaranteed that all of the debt secured by the home will be extinguished by the foreclosure. For instance if the loan is a line of credit and/or a refinance, it might not be covered under these laws.
Along the same lines, if you have more equity in your home than the remaining balance on the note, in some states, the bank gets to keep the surplus. Or gets to keep it if you don't claim it in a certain period.
One of the big underlying causes of the mortgage crisis was that banks were writing loans for more than the house was worth, based on future value. The person buying the house would get a home for a certain period for only the cost of interest on the loan. The theory was that at some period of time later, when the bank started to collect the principle part of the loan (commonly through a very large baloon payment at some point followed by higher monthly payments), that the homeowner would be able to either sell the home (and repeat the process elsewhere), or maybe their situation would change. Many of the people who got taken in by this was looking at being able to be in a half-million dollar home for a few years for just the cost of the interest, and then move on.
What happened is that home values didn't go up as predicted. As a result, people were not able to sell these properties and get out of the loan - and were also not able to make the balloon payment or make the increased payments on the loan because they were more than the home buyer planned for. This resulted in a lot of properties being foreclosed on, and the lending banks losing a lot of money since this was really prevalent in California in particular which says the bank is stuck for any deficiency.
In addition to the direct effect on the bank, it also triggered a major adjustment in home values, because now people are able to buy at auction very expensive homes for pennies on the dollar, further depressing the value of all homes in nearby areas.
Banks also became very reluctant to lend money, which meant that fewer people could qualify to buy a home. So if you were selling a home, there were fewer people able to buy it. This also reduced housing values. In many areas, homes have yet to recover to their pre-recession value.