It wasn't a matter of holding the property. Most simply couldn't make payments.
Walkaways worked because real estate debt (in most of the US) is non-recourse debt. You leave the mortgage, the bank (or present mortgage holder) gets the property. Debt is settled.
(Lender in this case, or the present mortage holder, itself a rather complex question given mortgage-backed securities and fast-and-loose assignments of title, gets stuck holding the bag. Eventually values climbed again, at least outside economically-blighted zones.)