I think most people get it wrong - it's not that people living in cheaper locations are underpaid. It's people living in more expensive locations that are massively overpaid. Just because a software engineer in SF can make $100k/year doesn't mean that's what the position is worth, it just means these companies are massively overpaying.