Not only that, a large portion of iPhones are manufactured in China, which sustains enormous supply chains and jobs there.
At which point it doesn't make much sense to operate in China.
This is also precisely why TikTok is not available in mainland China, because it doesn't meet those standards.
Tech companies don't do well because they tend to be staffed by people who 1. rebel against authority and 2. think that the liberal / anarchist parts of Western culture are the best way of doing things. What Uber did pissed off people in San Francisco, so it's small wonder the authorities would come down hard on them in China.
The word on the street is that people in China thought Googlers (and American software engineers by extension) were a tad insufferable and arrogant. One ought to be warned, that being arrogant is a surefire way to get people to beat you at any cost. And to be clear, I fit in that category myself.
At some point, I got off the high horse as far as China-this, China-that. Why? Partly because it didn't really seem important anymore, and partly because a lot of things that you can criticize China about, the U.S. has done as bad, and I don't like being hypocritical to that degree. You know what politicians like to do when things aren't so great? Point fingers at someone who's "worse." So really, in my view of things, FB and GOOG not succeeding in China would be a small price to pay for actually paying attention to things not right in the U.S.
If you want to give an example of a US company that is doing much better in China, it's Apple, and the sole reason is that everybody who works for the Chinese government owns an iPhone.
BTW I was living in China when Facebook got banned, it was in 2008 when it started becoming popular outside of the US. Nobody saw it coming, and obviously there was no way for Facebook to go back into that market once the CCP decided against that.