As I said, the Chinese actively censor what they consider harmful content. I don't agree with them on that, but that's their position. If you abide by their laws (that is: censor what they want censored and give them access to user data, I guess), you can operate. The UK blocks The Pirate Bay and various other file sharing sites because they figure those sites don't comply with UK laws. As soon as TPB disables the sharing of copyrighted content and appeals, they'd be unblocked, because it's not a blanket ban.
The fact that Google has offices in China, offers services in China and runs conferences in China should show that they aren't blocked as a company. Dragonfly wasn't shut down by China, but by Google after they faced internal push back by employees against supporting Chinese censorship.