Chinese government nationalized the data centers six months later, gaining access to all the encryption keys and user iCloud data at rest. Apple complied:
They allow a Chinese company to manage iCloud data.
Although I think they have regretted that decision.
Google, on the other hand, walked away from China and it's business as usual for them.
This has also created a market for very cheap uncertified Android phones+ accompanying malware.
Google famously pulled out of China rather than censor, but that was just a PR move because they already were failing in China. I'd argue that censorship is an altogether different situation anyway.
Apple removing iCloud from China helps literally nobody. Chinese users don't have an alternative that isn't subject to the same Chinese laws. Any user that wishes to resort to less-than-legal alternatives can do so whether or not Apple provides iCloud services.
Ultimately this boils down to "should the Chinese court systems be able to decide when to hand data over to the Chinese government", because that's the effect of using a Chinese partner company to manage the iCloud data. For everyone else it's "should the US court systems be able to decide" instead, which honestly isn't all that much better.
Tim Cook even said: "Compromising the security of our personal information can ultimately put our personal safety at risk."
And yet, here he is in China compromising personal data, all to make a buck.