A recent article in BusinessWeek, entitled "Bankruptcy Reform Bites Back," raises the issue of whether the 2005 BAPCPA amendments to the Bankruptcy Code has had a major impact on the collapse of the mortgage industry.  Basically, the author states that more Chapter 7 cases filed under the old law allowed comsumers to get a discharge of unsecured debt, allowing them to pay for the house. 

Some highlights – 

But today’s growing problem in the housing market is different—foreclosures are soaring, while bankruptcies, though clearly on the upswing, are running roughly at half the 2001-2003 pace. The reason: A new bankruptcy law, approved by Congress in 2005 after years of debate, makes it much harder for households to get out from under their consumer debt. The result: More people being forced to walk away from their homes, leaving lenders holding the bag. Perversely, a law intended to help the financial industry may be damaging the housing sector, creditors and borrowers alike. "It doesn’t matter what you think of the purpose of the new bankruptcy law. The timing is bad," says Susan M. Wachter, professor of real estate at the Wharton School of Business.

The old bankruptcy law, in effect since 1978, was considered extremely housing-friendly. Most distressed borrowers favored filing under Chapter 7, essentially cheap, quick debt liquidation. In practice, most got to keep their homes, while the rest of their property and assets were sold off to pay a portion of unsecured debts such as credit-card and medical bills. When the assets ran out, the remaining loans were cancelled—although some debts were off limits, like student loans and child support. Future paychecks could go to mortgage payments.