Maybe in a world where every software engineer is genetically engineered to have the same output then what you said about market efficiency would make sense, but this isn't that world.
The thing you said about price discrimination is not even related to what the OP said, and you simplified the problem a lot by reducing the problem simple monetary terms. The example you gave about expats is particularly flawed, because it's not unusual that expats are paid more for other values that they bring outside of the work they perform (for instance, academic institutions think of that as prestige in some Asian countries). We were all born unequal, if the market were so efficient there wouldn't be so many unjust things happening around the world.