This will be the logical conclusion to every major American corporation unless someone puts a stop to this. If profit comes before everything, then so will China's 1.4B potential market vs US's 330M market.
You are forgetting about manufacturing. While China is indeed an important and huge market for sales... approximately 100% of Apple's products are manufactured in China (save some tiny fraction that are assembled in India or Texas). Every iPhone sold everywhere worldwide (except the few assembled in India) comes from China. Apple cannot exist without China. Full stop.
Apple is still doing China because it wants to, not because it has to. At their size they have the time and money to invest in multiple locations and spread their risks.