That's not really true. Individual people make all sorts of investments that in expectation grow but still carry risk. A system where renters pay risk premiums to landlords is a fine marketplace. A system where landlords insist on carrying minimal risk while also using risk as an argument for extracting money from their renters is garbage.
The truth is that the price of rent is utterly disconnected from the value of a landlord's labor plus the various premiums you'd pay for risk smoothing, lower transaction overhead, and opportunity cost. Landlords simply charge whatever they can get away with and we should all laugh at attempts by landlords to justify their rent through any argument other than "fuck you, pay me." After all, I've never heard of a landlord reducing the rent when they finish paying off their mortgage.
Once we at least have this shared understanding we can start having a real conversation about the merits and costs of the system we have today, rather than this fake conversation about how landlords are so nice for paying for that new roof.