That's true, they do provide data to governments in compliance with local laws. Criminalising your employees isn't a good look.
https://www.reuters.com/article/us-apple-fbi-icloud-exclusiv...
Besides, haven't facebook and google got ban from China because for not compiling with Chinese law?
Web services companies face a ton of problems operating in China that are really specific to the kinds of services they offer. Apple simply doesn't offer those kinds of services.