I'm a member and live in a housing complex owned by a cooperative. The rent you'll pay in this kind of setting is at the lower end of the market, the services you get are at the upper end. Being a cooperative means I own shares, so I get dividends and balance sheets etc. Even with this great (for renters) setup, they still pay out 4% dividends and expand like crazy (not to produce more dividends but to provide more apartments). They could pay out much more than 4% but they don't want to optimize for profit and make it an investment, the dividends are meant to incentivize members to invest/save more than legally required.
The place I lived at previously had higher rents and less services. I don't know how much of a profit they made annually, but I'm sure it wasn't anywhere close to 4%.
Don't forget that "covering the mortgage" involves building the landlord's equity, so it's not as if this portion is lost to the bank while the landlord has to depend on appreciation. If I "only just cover the mortgage" while renting for the entire term of the mortgage on a house that doesn't appreciate above inflation, the landlord still goes from owning 20% of a house to 100% of a house over that term.
Maybe it's different in other parts of the world but where I live, rent seldom covers the mortgage on a property, let alone all other expenses. The profit, if any, generally comes from capital gains when selling the property (which right now isn't on the cards for pretty much anyone.)