I think that an argument about this arose in the comments on this post. Let me provide a framework for discussion.
Suppose that we observe that zip code X has higher average wages for waiters than zip code Y. Can we infer that waiters in X are more productive than waiters in Y? Can we infer that removing barriers to mobility so that waiters can move more easily from Y to X will raise real GDP?
I think that we need to know more about why waiters are paid more in X.
a. It could be that, working with a given level of capital, the same waiter can serve more customers per hour in X than in Y. Maybe restaurants in zip code X are better managed. Or maybe restaurants in zip code Y do not get enough customers.
b. It could be that the cost of living is higher in X than in Y. Waiters serve the same number of customers per hour in each, but if you raised wages in Y all the waiters would move there to get a higher real income. There has to be a wage differential to compensate for the cost of living differential.
If (a) is true, then removing mobility barriers would raise real GDP in the restaurant industry. But if (b) is true, then removing mobility barriers would not raise real GDP in the restaurant industry.
Suppose that the mobility barrier is a housing market restriction in X. Then getting rid of the housing restriction might raise social welfare by making the housing market function more efficiently. But there is no additional benefit from waiter productivity. What would happen if you got rid of the housing market restriction is that the wages of restaurant workers in X and Y would equalize. As waiters move from Y to X, the wage differential would go away. The new wage would be somewhere between the old wage in X and the old wage in Y.
Note that in case (b), restaurants might use more capital in X than in Y, because the cost of labor is higher (because the cost of living is higher). That would enable waiters in X to serve more customers per hour than in Y, but this is not a pure productivity differential. If you remove the mobility restriction, then eventually the capital intensity of restaurants in X and Y will be equalized.
What if the main difference between zip code X and zip code Y is that quality of life is better in zip code X? In that case, other things equal, cash wages ought to be lower in zip code X. Of course, other things are unlikely to be equal. Housing supply is probably not perfectly elastic, so some of the quality-of-life differential should be eaten up by housing costs. And of course, quality of life means different things to people with different tastes, and that accounts for some (much?) of location choice.
If I might try to coin a phrase of opprobrium, I believe that economists who equate locational wage differentials to productivity differentials are guilty of casual neoclassicism. They should be required to read James Buchanan’s Cost and Choice and take an exam afterward.