I think the biggest factor is 3d printing. For example, Adidas no longer has a factory in china, if you want to order sneakers you go online, you tell them what size you want, you pick the color, the style, etc. That order is made by a 3d printer making the sole of the sneaker and another machine then making the top. They save the cost to ship it here from China, they don't have to pay labor, they don't have to pay import tax, and they don't have to store the sneakers in warehouses or retail outlets. Customers get exactly what they want, they get it faster and they get it cheaper (as much as 40% cheaper).
So you are seeing the impact of AI (machine learning) on China, but that will hit the whole globe. Stock market is up because this is cheaper, faster, safer and better. But for China we are talking about economic catastrophe.
They may argue that China has been acting tyrannical so anyone who can leave is leaving or has left. There is political pressure, social pressure, etc. but I am guessing the real reason is they can make the stuff cheaper in the US or in Europe.
However, China is part of BRICS and that is an attack on the US dollar being the reserve currency, we are at war with China, and I suspect behind the scenes the US is doing whatever they can to make China subservient just as China is doing whatever they can to fight against the US (for example cyberattacks which the FBI referred to yesterday).