Consider this parable. There are two countries in Planet Earthopia. Productopia is the richer country whose citizens have a higher standard of living and are more productive. Barrenopia stands at the other end on incomes, standard of living and productivity.
Consider two scenarios. One, both countries decide to ease border restrictions and liberalise migration. Two, both countries go nationalist and clamp down on cross-border migration.
In the first case, there is likely to be an increase in migration from less productive and poorer Barrenopia to Productopia. This, by composition effect, would naturally lower the average productivity of Productopia while raising the net welfare of both countries combined.
In the second case, outcomes vary based on the rigour of enforcement. Strict enforcement limits migration and thereby lowers welfare gains, and perhaps even the combined output in so far as it lowers even efficient and productive migration.
Replace the two countries with formal and informal sectors, or urban and rural, and we can expect similar results.
An excellent paper by Gabriel Ulyssea examines the impact of various barriers to entry at both the extensive (expansion of formal sector by entry of informal firms) and intensive (formal sector firms hiring workers formally) margins. It finds that,
Reducing entry costs eliminates wasteful barriers to entry, increasing the mass of firms, total output, and wages. However, the intervention has a negative effect on aggregate TFP via composition effects, as it increases the presence of low-productivity firms in the formal sector. In contrast, increasing enforcement on the extensive margin generates a positive composition effect, as it eliminates many low-productivity informal firms, which increases TFP. The net effect is a 3% increase in total output. In terms of welfare effects, reducing entry costs leads to the largest gain (5.5%), followed by the payroll tax policy (4.4%). In contrast, higher enforcement on the extensive margin leads to a loss of 6.7%, which is a consequence of enforcing costly and inefficient regulations on all firms. These results thus show that lower informality can be, but is not necessarily, associated with higher TFP or welfare... At the aggregate level, I find that increasing enforcement is highly effective in reducing informality but it reduces welfare in the economy. Reducing formal sector’s entry costs is not as effective in reducing informality but generates welfare gains and leads to greater output and wages.
Rural poverty measures tend to fall more rapidly in countries with higher rates of population urbanization. Urbanization appears to be having a compositional effect on the urban population, in that the new urban residents tend to be poorer than the previous urban population. Naturally, this slows the pace of urban poverty reduction, even though poverty is falling in rural areas and for the population as a whole.