This is a large reason why many of our larger municipalities now forbid to buy a home in their zone if it isn’t (going to be) your primary residence. It seems to be working quite well.
The main reason anyone would own two SFHs is that you need to do this in order to move. If you sell your first home before moving you're homeless. And after that it can take a long time to find a buyer.
They're a bad rental investment though because it's way too risky to own one; one bad renter or one roof replacement means you've lost money.
Cost of construction also matters - it reduces the renter's BATNA which reduces bargaining power.