A dev who bought a home eight years ago has a substantially different net income after housing and taxes from a similar dev who would be moving to the area.
So there's some merit to the idea that SV/SF have a fixed number of developers for whom salaries in the $150k-250k range are excellent, and another pool of "new arrivals" for whom that salary is decent/good, but results in a substantially lower quality of life. Further raising salaries distorts the real estate market even more.
Since SV/SF/California seems uninterested in the political moves necessary to improve the housing supply (sensibly, as these market changes would negatively impact the voters who have bought into the current system) the natural result is to move to other geographic markets for talent.
In SV and SF, half the paycheck goes to the GOv and the other half goes to real estate.
If you want to cut labor costs, Simply find a city with a lower cost of labor. There's plenty to choose from: Austin, Dallas, Houston, Chicago, etc. All of these places sport roughly 100K salaries for senior devs. They could hire all the engineers they wanted.
And of course, there's always the final (least palatable) option: Improve your highering process. It's pretty ridiculous when half the employees of your own company wouldn't hire the other half.