Manufacturing companies use a lot of capital for their factories. Shut down the factory and outsource to China, and you have the same sales with a lot less capital, so the stock goes up. Great success.
Maybe repeat by having your suppliers do more and more of the engineering. At a certain point, you are just a brand, with no actual engineering capability.
You can't compete with the people who actually know how to make the things. Then you die. See Hewlett Packard.
The US taxing companies on global income at high rates also has an effect. Say you have 50% of your sales outside the US. You pay taxes in the country where you sell the product. Then you have profits overseas. If you bring that cash back to the US, you pay the difference between the corporate rate in country X and the US, which can be a lot, say 15%. Might as well take that money and use it to pay for manufacturing at e.g. Foxconn. So it's 15% better to invest in manufacturing capacity outside the US.
The poor health care system in the US drives up costs as well, twice what it is in other industrialized countries for worse outcome. Same for cost of housing because zoning laws won't allow building. Google was allowed to build offices in Mountain View but not residential property for the employees to live in. So everyone has to commute from somewhere else, and cost of rent is driven by how much misery you can handle.
Failures in government policy make US workers much more expensive without creating any more value or improving the quality of life for the employees.