That’s because it is easy to compete to sell food. Housing doesn’t work that way.
Agreed, but there's a lot that could be done to make it much much easier. For nearly a century, housing policy has been explicitly designed to make housing a productive asset for investment, which is a goal that's fundamentally opposed to housing being affordable.