This isn't really an argument against doing it. People also need to eat (more than they need a house, in fact). Farmers still should be able to get paid for helping to meet that need. People need to drink water. If you sell them water, there's nothing wrong with that. Just because something is a basic human need doesn't somehow mean that it's wrong to profit from filling it.
The fundamental error in our understanding of economics is treating non-produced goods like land as if they were "capital." There's nothing wrong with investing in producible goods -- in fact that's ideal. But when people gatekeep nonproduced goods, especially nonproduced goods that everybody needs to live (ie, land) - that's where everything breaks down.
> I'd prefer real estate investors drive for their properties to generate regular income, though, rather than the common practice of buying property with the main goal of selling it later at a decent profit.
I'd prefer no real-estate investors other than home owners, honestly. They don't seem to add value to the world.