Consider the alternative. If there was no consequences for not paying rent or not paying mortgage, who would pay either of them? If there was no legal mechanism to deal with squatters then many landlord would resort to force. It would make drug violence look trivial in comparison.