This is was a result of China's mercantilist trade policy - e.g. suppressing the value of the yuan/subsidizing industry
-> manufacturing moves to China
-> ecosystem gets richer
-> manufacturing becomes more valuable in China
-> more manufacturing moves there.
etc.
It took 20-30 years to get the ball rolling before network effects took over, but now if you want a specific kind of LED or a different size bolt at scale the chances are the pearl river delta will be the easiest place to source it and if that's what you want to build, it's the best place in the world to sell it.
The economic risk this presents to the rest of the world is severely underestimated. Industrial ecosystems take decades to grow and decades to decline, but access can be cut off overnight.
The benefits of network effects that cause software companies to concentrate in a few areas are even more pronounced in the hardware field.