The fact that a bank will foreclose if you don't pay isn't a justification that it is OK not to repay any more than the fact that the government will send you to jail if you steal makes it OK to steal and just do the time for it.
It is your obligation to fulfill the terms of your contract and the clauses telling you what actions they will take if you don't isn't to be construed as proof that being a deadbeat isn't wrong. It's just proof that lenders know a lot of people like you simply can't be trusted to do what you agreed. They're not to "allow you not to repay". They're there to tell you what they are going to do if you fail to meet your obligation. That's what the loan security is about. It's not a "repayment optional" clause.
And your credit will suffer because you have proven that you don't have enough character to be trusted. That wouldn't happen if repayment of loans was optional. It is a black mark against you. And it's well deserved.