'Socialize' sounds like a dirty word doesn't it. When their kids are grown up most people have to charge them something each week. Usually the idea is to cover their own costs, not to charge the most their can. This is not considered immoral in itself or communism.
Capitalism does seem to work better with human societies than pure communism, but there's nothing holy about it. It's just a method we came up with that mostly works.
It can be counter productive. On the face of it if you give me a national railway network I will ensure it works well to maximise my profits - that's the beauty of capitalism.
So far so good, but I quickly see that abandoning all the rural areas and concentrating resources elsewhere will make me even more profit. In fact if I don't replace old equipment, but just charge more for a smaller service my profits will be even higher.
So you have to step in because in the case of a service needed by everyone, maximising profits can not be the only factor considered.
Since everyone needs somewhere to live it is to the advantage of society as a whole that it works right. So I'd have a lot of council housing priced so they made a small to medium profit. I wouldn't ban private landlords, but if a large percentage of homes were council owned it would add stability.