I am not a lawyer, but I don’t think you are quite correct with this. It may be practically true, but I believe that the note you sign when you get a mortgage carries with it a contractually binding obligation to repay the loan. The lien placed on your property by virtue of the mortgage is intended solely as default protection for the lender, not to be a suitable option for the borrower to satisfy the contractual obligation. It’s more like an option for the bank rather than the borrower - the bank has the option to foreclose the property in the event that the borrower breaches the contract. Further support for my take: if you are foreclosed and the proceeds from the sale are insufficient to cover the remaining principal (plus allowed legal costs associated with the foreclosure), you are still legally liable for the remaining amount owed. A bank may recognize that they are unlikely to ever collect this amount and settle for a short sale, but they are not obligated to do so. Foreclosure itself does not satisfy the obligation unless the funds from the sale are sufficient to repay the debt.
It actually varies from state to state.