Still, interestig to see a nice quip at a completely wrong scale/context captivate such a large audience.
You are aware that that is just your arbitrary declaration of what you think their role should be, right? I hereby declare that their role is to do just that. What now?
Likewise, Apple can play China's game, or just cease to exist in china where someone else will merely take their place. The situation is exactly the same, grandma is getting mugged no matter what.
But...even worse than that though, the company has to compete with those Chinese players outside of china as well, and leaving Chinese market share out, that can make it harder....they could disappear entirely from the rest of the world as well (assuming Chinese players are competent outside of china, which admittedly hasn't been shown yet). So at the end of the day, of competition is working perfectly, those that refuse to play in a market can simply be selected out completely. Leaving only players who are willing to mug grandma...not because all the companies are evil, but because the non evil companies died off.
It isn't simple. In the long run, a political solution will be needed, we can't leave morality up to private companies that have to compete or die.
Here is how it would play out: Tim announces they are leaving China, Apple stock loses 90% of its value overnight, Tim is removed as CEO, new CEO comes in and says they are staying in China, Apple stock recovers 70% of its value.
So ya, even if Apple isn't selected out, Tim certainly would be. You are suggesting actions that a publicly traded company just cannot make. Don't try to outsource such morality to companies, they don't have the ability to act like that and exist at the same time.
~20% in Q117, down 12% from Q116 [0]. China is their only shrinking market (at least at the granularity of data provided).
[0] https://www.apple.com/newsroom/pdfs/Q1FY17DataSummary.pdf