Well, they took a politically- and PR-unfriendly stance when suggestions were made that they should provide an iOS version to the the federal government that allowed a passcode bypass because terrorists.
Again, leaving China would not help their users, but it would be a huge blow to their finances today and in the future. Is martyrdom a good play for a business and its stockholders?