Those cities also have the same restrictive zoning laws, preventing new office buildings and housing just like the expensive cities.
Many American cities are experiencing price increases out of line with prevailing wages to the point that the median income cannot afford the median house. And we're not talking NYC and SF;think Nashville.
Furthermore, talent is concentrated in a few areas. A software firm in Nome, Alaska will have a harder time hiring than one in New York. Infrastructure like airports keeps businesses in hubs. Ports make goods cheap to ship. Having large numbers of local customers helps too
In Silicon Valley the dynamic is different, because it’s mostly global headquarters full of upper management and highly paid engineers. Unlike low-wage employees in regional offices, those people are not considered disposable, and aren’t willing to relocate on a whim. So relocating headquarters to another city or state is extremely hard for large companies.
What is preventing companies from moving to less expensive cities? By the free market logic, it should decrease demand/rent in hot cities, and provide these companies more affordable workers.
At which point is the housing pressure strong enough so that jobs start moving elsewhere, and market effects between cities or state come into play (i.e. if a city "choose" to limit housing it will limit it's economic potential compared to others)?