A high cost of living often means the area is desirable to live in, which is hard to value. SF has much nicer weather and culture than Minneapolis, which to many people is worth a lot more than the cost of living difference.
Think of it this way: people want to live in desirable places even if they have jobs that don't adjust for cost of living.
Think of it this way: people want to live in desirable places even if they have jobs that don't adjust for cost of living.