So let's see, you're Google, and you want to set up your search engine in China.
"Not so fast" says the local big cheeses. "You have to censor search results in compliance with laws X Y and Z. If you do not, your employees will be jailed and you will be shut down."
As a Chinese citizen, which is the best result?
Let's do a very simple payoff matrix.
Outcome A: Google avoids China altogether
Outcome B: Google opens in China and complies with the law
Outcome C: Google opens in China and does not comply with the law
Google Chinese Citizen
A 0 0
B 1 1
C -1 0
Only option B leaves all parties better than they started out.