To spell it out a bit more... I'm arguing that the low housing supply makes housing expensive which drives up wages and material costs (because the land for the lumber yard is so expensive and the materials have to be transported farther to job sites) and those nanny-state codes and ordinances ARE part of the housing policy. That's the part that affordable housing advocates are trying to fix.
All those codes get deployed in the service of incumbent homeowners, often in situations that have little resemblance to the situations envisioned by lawmakers.
There are other factors, like SF being on a peninsula, a lot of places with steep hills and things that genuinely do drive up prices, but an inability to build is a problem. Over the last 10 years, our county has LOST housing stock. We have fewer houses today than we did in 2015.