Your salary is highly dependent on what the next-best thing you could be doing if your employer didn't hire you. If you live in a city where only your employer hires developers, your next best option sucks, so you can be forced to either move out or accept an uncompetitive offer. If you live in the SF Bay Area, you can walk out the door of Facebook on a Friday and into Google on a Monday, which means that both companies must compensate you handsomely in order to keep you around.
The marginal increase in salary that you might get moving to SF is almost guaranteed to be dwarfed by the net increase in cost of living from moving from virtually anywhere in the country to SF. Therefore net income actually goes down.
I understand the numbers seem like they look good ("omg $150k is higher than the $100k i'm making in smaller city X!), but the BATNA isn't really a BATNA, as the market dynamics are different...it's almost like propaganda with no factual basis at this point.
I'd take my fewer work hours (due to easier commute,) nice take-home, a house, etc. over an SF offer any day.*
*Everyone has their price, and sometimes the argument doesn't hold if the offer is _crazy_ high to make the argument above false...but that's the rare exception, not a rule.
Your salary is highly dependent on what the next-best thing you could be doing if your employer didn't hire you. If you live in a city where only your employer hires developers, your next best option sucks, so you can be forced to either move out or accept an uncompetitive offer. If you live in the SF Bay Area, you can walk out the door of Facebook on a Friday and into Google on a Monday, which means that both companies must compensate you handsomely in order to keep you around.