You are forgetting that the Chinese government was also willing to setup an entire city wholly dedicated to the assembly of iPhones. It's not just the low wages and perceived lack of labour rights, but also the supply chain and infrastructure there that made it possible for Apple to churn out hundreds of millions of iPhones every year and ship them around the world.The short-term gain of cheap labor and the lack of labor rights/laws in China was too much for TC (and other tech companies) to resist.
Simply put, no other country possessed the capability, or the willingness to commit to the extent that the Chinese government has.
Or to put it bluntly, Apple would never have grown to the size they are today if they had chosen to not manufacture in China. Their products would have cost way more, be even more supply-constrained, and I fail to see how that is a net benefit for any of us who, prior to the pandemic, were already complaining of apple products being expensive.
It's still worth it overall.