Legal residence gives them the right to time to move on peacefully rather than be dumped immediately into the sometimes permanent downward spiral of homelessness because this would be awfully convenient for the new owner.
Buying the properly doesn't entitle you to skip this step. I can't imagine a world in which it ought to. This is something the prior owner ought to have ironed out prior to selling. Either the property was still a worthy project despite the issue or they should have taken their money elsewhere.
Put yourself in the place of the residents. You have few resources and nowhere to go. The government provides that the new owner must give you a finite and reasonable time to move elsewhere do you a) lose most of your few belongings and go sleep on the curb because some yuppy comes and yells at you or b) use that time to save money, make plans, and secure yourself a new place to live.
You see it from the perspective of someone with connections, family, money. Many people have none of these things. It wasn't a choice between the inconvenience of moving to a new home and thumbing their noses at her it was in all likelihood a choice between the street and keeping their lives together.
If you have never struggled you likely don't understand.