The trick is, or was, demographics. The boomers outvoted other groups, because they have larger numbers. Why build housing that diminishes the boomers (ie voters) property values? Also, why limit demand for the hoarded housing by enforcing immigration laws, not undercutting local labor with exploitative practices like h1b abuse, or by creating reasonable legislation like other nations have that protects real estate from foreign speculation oand domestic market manipulation by monopolistic and predatory corporations like blackrock and blackstone? Because the boomers had the numbers and the real estate, and democracy is mostly about winning elections.
You're giving them too much credit.
There isn't a boomer conspiracy that they are all in on. There isn't a secret Whatsapp chat for boomers to conspire to cheat the next generations out of housing.
It's just bad local policies, because small towns hate density and don't understand second order effects.
99.9% of boomers don't make conscious policy decisions either.
It's affordable because it has accumulated a lot of infrastructure debt, for example things like: insulation, roof, plumbing, electric. etc. etc.