Look at it the other way around. If where X lives a decent home costs you $1,000/mo, and where Y lives the equivalent home costs $2,000/mo, how fair would it be to get the same wage?
On the similar lines I don't understand the concept of companies asking people about their compensation in the previous company. You are supposed to pay for my work, how does my compensation even matter here?
If my previous compensation was high will my work in the current company become more valuable or earn higher profits?