Stephen Foley: So is it about the ethics or the money?

For all its potential, China accounts for barely 1 per cent of Google's revenues

There was something deflating about Google's decision to set up in China, like hearing an idealistic student had cut his hair and gone to work for an investment bank. The search engine company had not only revolutionised the internet, it had also promised to change how corporations operate. For a decade it had held fast to its motto of "Don't Be Evil"; and yet the price of admission to China was submission to the Communist regime's rules on censorship.

The new – launched in 2006 – filtered out the foreign websites and internal content that apparatchiks deemed subversive. Executives argued at the time that it would at least be able to encourage web use in China, and that the leaky, cacophonous internet would ultimately overwhelm censors – but the cynical viewed this as a fig leaf for what the company's new motivational force: making money.

By mid-2009, China had 338 million internet users, more than any other country in the world, but that still represented less than a quarter of the population. Google has turned itself into a $200bn company by selling adverts alongside its search results, and it anticipated repeating its stellar growth in China.

A campaign against Google's self-censorship remained an embarrassment to executives, however. From day one, the company was deluged by complaints. In June 2006, Amnesty International published Undermining Freedom of Expression in China: the role of Yahoo, Microsoft and Google, and took Western internet firms to task for supporting the repression of dissidents in China.

And in the US, the company has come under uncomfortable scrutiny from Congress, along with other US internet firms operating in China. Controversy flared when it was revealed Yahoo had given the authorities information on one of its users, journalist Shi Tao, who was arrested and imprisoned for leaking a government document.

At the subsequent Congressional hearing, Google's public affairs director, Elliot Schrage, told lawmakers that complying with Chinese censorship laws was "not something we did enthusiastically or something we're proud of at all". Democrat Tom Lantos said: "I simply don't understand how your corporate leadership sleeps at night."

Google executives, including its co-founder Sergey Brin, had become increasingly convinced that doing business in China has been a "net negative" to date, even before last month's cyber attacks.

Pulling out, however, was hardly an easy decision. When the company's legal counsel, David Drummond, posted his bombshell blog post on Tuesday, he made more than a nod to the business opportunities on the horizon in China. "In the last two decades, China's economic reform programs and its citizens' entrepreneurial flair have lifted hundreds of millions of Chinese people out of poverty. Indeed, this great nation is at the heart of much economic progress and development in the world today," he said.

In New York, where Google's shares traded lower yesterday, financial analysts were trying to count the cost of its exit, should the Chinese authorities refuse to allow it to run uncensored web searches. The company has about 30 per cent of the search market in China, behind local competitor Baidu, but was growing fast with new ventures in music downloading and phone software, which could be hurt if this turns into a bigger feud with the government. For all its future potential, though, China so far accounts for barely 1 per cent of Google's revenues, and probably even less of its profits. Jeetil Patel, an analyst at Deutsche Bank, thought China accounts for only $4 of the $580 Google share price.

By contrast, by standing up to the Chinese authorities, Google closes a public relations sore, and puts pressure on rivals Yahoo and Microsoft. Last night, Yahoo said it was "aligned" with Google in condemning the cyber attacks, but made no similar threat to change its operating policies in the country.