system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:How does the middle income trap work?

My understanding is that the middle income trap describes countries that have risen from extreme poverty, but not into first world status.  Malaysia is often cited as a textbook example.  What is the prevailing though of why this happens.
gpt
when you have an economy that has a lot of workers that can be fairly low-paid workers (compared to more 'developed' countries), companies will start up factories there to take advantage of the lower costs. The people working there will happily do so because the pay is better than might otherwise have happened, so everybody seems happy. This influx of money creates a 'middle class', who aren't rich exactly, but have more money than the traditional working class. Wages increase (as they usually do), but eventually, another country is able to provide a workforce that is cheaper again which means the upward mobility in the original country stalls.