It's incredibly unequal though.... And as choice diminishes, it is not always a case that people "want" to live in that particular property - more nd more, it is a case of what they can get/afford, as might be the case for the OP, sadly.
I knew someone who rented a small house when marriage broke down. Largely misled by husband, who then took a very long time to sort out the marital home which had equity. The rented house was owned outright by the landlord (only one of two that he owned), and by the time the marital home was sold, she could not afford to buy as prices had increased, but he was awarded more of the small amount of equity due to having lived there "longer" (or some such BS).
Over the 10 years of living there - and not having anywhere else to go - and renting one of the only small properties in the village, the initial value of the house had been paid in rent. And the house had actually tripled in value. It had been a big fat win-win for the landlord when he then, after all those years, decided to not renew the tenancy. She had to actually leave the village.
This may not have been paying the mortgage for him, as that was not necessary (although he could have taken one out against the property) in this case. But it certainly gave him plenty of speding money and in the end bought him a Rolls Royce. This was in effect paid for by his tenant.
Paying a mortgage for them is almost worse, when you hear things like (as I did on the radio the other day - and am listening to yet another R4 programme about renting again right now) such, as, "The landlord wants to move their family in", or similar. I find it all quite disgusting - however "necessary" it is deemed to be these days.