Those factories migrated to the US South, then to Mexico, then to China. Not because of some conspiracy, but because we run our institutions based on quarterly financials.
I worked a long time ago on an effort to sue a large manufacturer whose supply chain was shipping counterfeit parts to certain customers. The Chinese partners ran a third shift with no QC and stuffed these parts into the distribution chain. They also stole defective parts and did the same thing. Everyone knew this was happening. But everyone was making money, so nobody gave a shit.
With respect to politics, well yeah, they are the other great power now. It’s in their interest to buffer themselves from whatever they perceive as a threat. The US is no babe in the woods here - our war plan from the 1950s onward was to attack China with nuclear weapons if the Soviets rolled into East Berlin - just in case.
The Chinese can’t compete with the US with air or sea power, so they seek to control their sphere of influence in other ways, and slowly build in preparation for the US decline in power.