It works fine for the most part, we have cheap chips (not right now, though) cheap parts of cars, cheap TVs, etc. That are manufactured in developing countries (helping them develop in the process) and designed in developed countries (where only this stuff is possible to design).
It just breaks down when bad actors go against reason for long enough, but the market also corrects for that changing supply chains.