A developing country has advantages, often, in manufacturing, just as the US did in the 19th century and part of the 20th.
1. Few regulations on pollution or mining or worker safety;
2. Cheap power, in China delivered by the State;
3. Very cheap labor costs, you don't need HR and Regulatory and legal and whatnot western companies are saddled with. No unions of course.
4. Potentially cheap capital.
5. Workers are fairly happy if their lot improves over time, even slowly, they may get housing and medical for "free".
Production of stuff is going to seek the lowest cost geography, just as the cotton mills moved from the NE US to the South in the 1950s. I remember when textile mills dotted the southeast, I don't know of any extant today. If a company does not seek cheaper production, it won't stay in business long.