And it has
much lower overall population density, so diversity and affordability clearly aren't automatically driven by density.
Houston has space to expand so it can easily keep building outwards without bulldozing shit (which requires people wanting to sell their land, etc, etc). Development is easy if there's nothing to displace. NY? LA? SF? Not so much. No coincidence that Chicago is much cheaper than those geography-bound places too.
Compare Houston to other cities in Texas *that have plenty of zoning of the sort that would be immediately recognizable in the Bay Area) and it no longer looks like any YIMBY miracle of affordability. Just... basically the same...