Bankruptcy is a legal manuever available to all Americans. If a homeowner wants to take bankruptcy I have no problem with that. The court will decide if it is legitimate or not. Most personal bankruptcies are decided very fairly to debtors in court. Plus, most jurisdictions give the parties the ability to mediate a settlement before going to court.
By the same token, if a borrower can have a contract voided or nullifed by a court, fine. If a borrower can negotiate an advantageous deal with a lender that’s OK too. What I have a problem with is borrowers refusing to pay a legitimate obligation when they fully have the ability to do so.
Your analogy is flawed because on one hand it has a borrower engaged in a legitimate legal process (bankruptcy) and on the other hand, this thread is about borrowers who have the capacity to pay but refuse to do so, just because the value of the collateral is less than the mortgage balance. In my view (leaving aside my opinion of the ethics) this is a very short-sighted strategy.
In the case of a mortgage, you're not obligated contractually to pay it. You're contractually obligated to pay the monthly premium OR surrender the house. The latter is always a legal option.