The actual value of landlording is offloading financial risk. The tenant pays a stable rent including a premium in exchange for maintenance, repairs, and not having to sell a home in order to move to a new one.
I just can't bring myself to agree with the hard-line socialists who think landlording is fundamentally a bad thing. There are a lot of problems with it, but it does have a legitimate place in the world.