A landlord is doing exactly the same thing as an investor. They are tying up their capital in exchange for an income, and the possibility of a capital gain.
As described above, a landlord is not a developer is not a property manager. Sometimes a single individual plays multiple roles, but that does not make them the same inseparable job.
That is not a problem, but the problem is that now they are financially incentivized to screw their tenants as much as possible. With a different capital project, sure they're screwing their customers, but at least I go shop at a different store. Humans need housing, and moving is annoying and expensive.