First, sf and the valley simply don't pay engineers well enough. This is the second, striving to become the first, most expensive housing market in the united states. $150k sounds great here until you look at that as a fraction of your housing cost and compare to anywhere else in the country, including manhattan (because unlike here, nyc isn't run by morons so they have functioning transportation systems). I don't want to just quote myself, but all this still applies: https://news.ycombinator.com/item?id=7195118
Second, immigration is a crutch to get around paying domestic employees enough. I see net emigration from the valley amongst experienced engineers in their 30s who start having families and can find better financial lives elsewhere. If companies paid well enough that moving to the bay area wasn't horrid financially, they'd find plenty of software engineering talent already in the united states. But consider my friend above: $165 total income in the midwest is (compared solely to housing cost) equivalent to approx $450k here, when holding (housing costs / post tax income) constant.
edit: not to mention, companies still don't want flexible employment arrangements or remote work. I'm a data scientist and I'm good at my job (proof: employment history, employers haven't wanted me to leave, track record of accomplishments.) I'd rather live elsewhere. 66 data scientist posts on craigslist (obv w/ some duplication, but just a quick count) ; jobs that mention machine learning fill search results with > 100 answers . Now check either of the above for telecommute or part time. Zero responses for remote or part time workers. So again, employers want their perfect employee -- skilled at his or her job, wants to move to the valley enough to take a big hit to net life living standards, doesn't have kids, and doesn't want them (cause daycare or a nanny or an SO who doesn't work is all very expensive.)
This really is it. I think employers are between a rock and a hard place. Engineering salaries are rising rapidly, but the engineers aren't really seeing the benefits of it - every raise is just as quickly swallowed by the ludicrous housing situation in the Bay Area. Nobody's getting rich except landlords.
And anecdotally as someone who moved from SF to NYC, $150K goes way further here than it does in San Francisco. SF housing is (nearly) just as expensive, and the lack of basic infrastructure means there are tons of little things bleeding you dry at every corner. Buses don't run where you need to go? Call for a Lyft or Uber - individually not very expensive, but it adds up. Death by a thousand paper cuts.
I didn't like where he said "get them to move to Silicon Valley."
Moving is stressful and costly, even if the company is 100% covering relocation. Moving to Silicon Valley would require a quite significant raise to cover the increased housing costs, which would still leave me with a much smaller house than I enjoy in a top 20 (but not top 5) market.
The absolute cheapest home near my work with 2 bedrooms is a condo at $700K (source: realtor.com). (edit: that is an outlier, most are considerably more expensive, and these days the 'ask' is the lowball figure - people will bid several hundred thousand over the ask to buy, because they are competing against other twitter millionaires buying for cash and nonchalant about the housing bubble because they can't be really hurt if it crashes)
To get a home equal to the home I moved from in CO (which I bought for $425K) would be, I don't know, nothing is listed to compare. Over $3M I would think. My friend recently sold his house north of that, and his yard was tiny and the house was smaller. My CO house is comparable to a $4-5M Tahoe mountain home - a few acres, awesome views, wooden beam interior, huge open space interior plan, full basement, multiple decks, and so on. (edit: okay, cabinets are Home Depot, not custom built, etc, but it's still a close comp otherwise)
So, yes, if you want to live in a cramped condo, see your money evaporate to taxes, driving to work, private schools, and so on, you can 'life hack' here. Or, you can live elsewhere, own a few acres, have a big garage, a rec room, work normal hours, have half the commute, and still save plenty of money.
While you aren't going to be living on a few acres working at a tech job in the Bay Ara (barring long commutes), you are exaggerating a bit here.
- If you live in SF, you generally don't need to drive to work. Your commute will be short (<25 minutes). You can get quite livable single-family homes (3 bedrooms, 1400 square feet) for $750k. You may want to consider private schools.
- If you live in areas where you want to get good public schools, prices may surge to $900k for homes that size.
tl;dr If you want a huge home with huge lots, yes, very difficult in the Bay Area. But if you just want a typical suburban lfiestyle, it is pretty easy to do on a tech salary.
I live in Dallas, have a driving commute well under 25 minutes, and have a 3 bedroom, 2300 sqft house I paid $175k for with the same stipulation on the schools. Your scenario would be a major cost increase for me. In fact, I could probably max out my 401k here with just the housing cost delta. Austin is more expensive than Dallas, but I wouldn't expect to pay more than about $250k - $300k for my house there (for reference, my house is worth about $190k now). I could downsize to your SF-sized house here for under $100k. Since I would realistically only get about a 70% pay raise max over my Dallas salary for moving to SF, it doesn't make any sense.
 And my house was a good deal even for Dallas.
Let's say in SF you get $150k and put 10% away with a 5% match. That's $22,500 per year you're socking away into your 401k. If you live in Orlando and you're making $90k/yr and put 10% away with a 5% match that's $13,500, a net loss of $9k every year in early retirement savings. After compound growth over 40 years of maturity that's going to be a TON of cash. As long as you don't plan on RETIRING in SF, you're much better off working there.
From my experience, that delta is higher in low expense areas. The assumption I'm making is that the typical HN'er is a top performer who can demand top percentile salary in any market, or work remotely.
The hack I recommend is getting SF salary in low-cost area.
I work in rural MA and make considerably more than the given SF salary (non-remote). The SF salary is probably better on average (the 50 percentile), but I stand by my statement that top performers can command SF salaries in any market. Even if you can't find something local, there are a ton of remote options.
I really enjoy owning a house. I wouldn't be able to afford it in SF. I bought a nice 3/2 in Orlando for only $110k a couple years ago. My dog loves it too. :) So there's also that.
Urban centers have a pretty finite supply of housing, so you're looking at what amounts to a long-running auction for rents among residents. People are generally pretty willing to "bid" 25-35% of their income on rent (or more, depending on the area and demographic), so as average salary rises, rents are going to rise too, unless you're expecting a major urban retreat sometime soon.