-The max quality or size of rental properties is not that high, you may not be able to rent a nice freestanding house in some places because culturally speaking, people with more than $X usually buy.
-Landlord-tenant law may be very favourable to the landlord and not to the tenant. That motivates people to buy rather than rent and deal with shitty landlords.
In addition to that, people like being able to invest their time and money into improving their home to just the way they like it.
Having a long term place that is "home" is very important and comforting to many people. There is a reason that residences have all kinds of special legal protections and treatment that commercial real estate doesn't neccesarily have.