In probably every state in the US, it’s illegal to change the locks without legally evicting a tenant. Which usually requires months of court battles, which if they don’t leave voluntarily, culminates in law enforcement forcibly removing them while you pile their stuff on the street. As a landlord, I’ve come within days of that outcome a few times. It’s both sad and infuriating. Sad because I don’t want to put someone on the street regardless of circumstances. Infuriating because we only got to that point after months of lies, broken promises, legal costs, and essentially open theft. At some point you don’t have much choice but it still sucks.
Here in the UK tenants have a lot of protection. It's very difficult to evict someone, and it's illegal for the landlord to enter the property without prior agreement from the tenant whether they're behind on their rent or not.
Maybe some countries are super lax but i would have thought most western countries don't just allow people with no valid agreement to stay somewhere.