Or you need to have decent tenant protection laws.
In SF, you can’t evict tenants because you sell the house, and you can’t evict tenants with kids during the school year (without a just cause).