If you go from say 120k to 240k in salary your housing may go from say 1k (12k/year) to 3k (36k/year) but at the end of the year 120k-12k is 108k while 240k-36k is 204 which is a net gain of 96k!
Of course you still need to eat and stuff but when you check out the "Regional Price Parity" [1] you'll see that nowhere do things actually become twice as expensive. So you're really getting a 2x boost in salary in exchange for a 1.3x increase in expenses.
[1]: https://www.bea.gov/data/prices-inflation/regional-price-par...