Exactly! And also the rest of the benefits of speculation apply to housing just as much as anything https://en.wikipedia.org/wiki/Speculation#Economic_benefits
Namely, real estate investors provide liquidity to the market, bringing price stability and absorbing risk from developers and homeowners.