Sure it would be great to have both a high income (relative to local costs) and a job you love and plenty of other options, but if one must choose... I choose to trade away the upper-middle-class lifestyle in order to have enjoyable and impactful work in my chosen field of software engineering.
It amazes me how many people in tech can't do simple math.
Hint: The Detroit area job market is on fire, but you will pass it over if your idea of compensation doesn't take into account cost of living. I'm sure there are several other cities that can say the same.
There seems to be ample [1] data [2] about [3] this.
1: https://www.glassdoor.com/Salaries/san-francisco-senior-soft...
2: http://www.payscale.com/research/US/Job=Senior_Software_Engi...
3: http://www1.salary.com/CA/San-Francisco/Software-Engineer-II...
In any case, somebody who thinks this represents a significant slice of the Silicon Valley workforce is living in a bubble. For every engineer making >$500k, there are many thousands making <$200k, at the thousands of other tech companies in the Bay Area that aren't Google/Amazon/Facebook/Apple. While the $500k engineer has every incentive to stay in SV, that has no bearing on the vast majority of engineers.
I have heard that at FB and Google, a very small percentage of engineers got special stock awards a couple years ago that could put them in that range. But most top performers at these places at the senior/staff level are more in the 175-350 range.
Other than that, the only engineers making that kind of money got lucky in a startup lottery.
I doubt Apple, Amazon, or even Facebook pay that much on any regular basis, but I wouldn't rule out someone getting an outsized offer during a machine learning (or other flavor of the month) hiring frenzy.
[1] https://www.glassdoor.com/Salary/Google-Staff-Software-Engin...
If you want to raise a big family, you're better off elsewhere. Even with a really reduced total comp, say ~300k, you could have a 6-bedroom house on the beach or on a 30-acre lot. You could have a guest house and servant's quarters.
Definitely has something to do with it. I'm a software engineer in the Detroit area and the last time I switched jobs (4ish years ago), it took less than 2 weeks from the time I updated and posted my resume to signing an offer letter. With the number of calls and emails I get daily for different positions in the area, I have a feeling it would go just as quickly the next time I decide to make a move.