It's a little unfair to blame startups, they largely just set up shop where the capital is. Most VCs required startups to be headquartered near by for easier management/communication. The tech scene in SV had such exceptionalism that it quite literally viewed any startup not in SV as an inevitable failure. Even YC mandated startups be in SV.
Most of the real estate "in the mountains" here in Colorado is basically SF prices, with a whole extra set of challenges. Even the front range I think has even worse home price to median income than a lot of the other places people think about when bitching about housing affordability.