Google was getting their butt kicked by Chinese competitors, namely Baidu. They weren't exactly making tons of money anyway. So they gracefully did a PR move and pulled out of China.
Google surely wasn’t as good as Baidu in scamming terminal cancer patients with the help of the PLA.
Going by that logic, it should even be more easier for Apple to leave China. They are also getting their butts kicked by the local Chinese firms.
Apple makes a lot of money in china. Much much more than local Chinese mobile phone producers. Huawei might sell more phones than Apple, but their margins are slim to negative.