While housing is absolutely ridiculous in the Bay Area, the total compensation much more than offsets it without having to live in a tent. I moved from a solid job in Raleigh NC (low COL) to a good (but not especially remarkable) job in SF and my annual savings increased almost 5x. It would take a few more years here before I could _buy_ a house, if I wanted to pay the absurd local prices, but I also have the option to work here for 5-7 years total and then _retire_ to one of the many low COL areas in North America. Living in an apartment for a few years is not that big of a deal when that’s the payoff.
I would say being able to retire comfortably to a low COL area in a decade or less a lot nicer option than going straight there and _needing_ to work a full 30-40 year career. Of course you can still work after retiring from SF if you want, but not _having to_ is kind of a big deal.