This is the case for people with little need for space. If you are happy to rent a room and you don't need a parking spot, you get a great deal. Investments and mail-order items aren't any more expensive in San Francisco. Local expenses like food are break-even with a 2x price increase.
For people who need space, just forget it. House prices are roughly 10x higher than in the ordinary small cities, ignoring the difference in land area. Families need the space.
I know a former San Francisco resident, now in Florida, with enough space to raise sheep and shoot an AR-15 in his yard. He's not rich. He earns a salary as a good software developer, and he decided to buy that kind of space. It's 11 acres if I remember right. He couldn't have that in San Francisco, even earning literally twice as much money.
https://www.rentcafe.com/average-rent-market-trends/us/ca/sa...
(Note that is ~700 sq feet, not meters)
But, you also make literally twice as much money, so it easily offsets the extra rent.