Fundamentally they moved their kit into a state owned data centre.
They did it in two steps. Apple forced users to opt into storing iCloud data in Chinese data centers, and then the Chinese Government nationalized the data centers six month later.
Apple's own statements on the matter are vague and you'll need to dig through their ToS, but here it is anyway: