I don't see how they could have stayed in China and not been involved in things that are truly evil. When the government phones you up and tells you to hide search results related to babies dying from diluted baby formula (yes, this happened), could you in good conscience tell one of your engineers to add that filter? How could a company like Google possibly retain good people when they have to ask them to do the bidding of such an evil government?
Google could spend eternity fighting this until the government changes (ha), or pull our and upload their value of organizing the world's information without* censorship.
In your eyes, they are more evil for not bringing their products to China, in their eyes, they are more noble for making their anti-censorship* stance loud and clear.
Apple in this case can be viewed as doing good (assuming having an iPhone and access to Apple's stuff is good for people) or as putting money over censorship values. It's all about which angle to look from.
The world isn't hurting for search engines, mail providers or luxury smartphones. Maybe Google decided that fighting the Chinese government is not the right battle and allowing direct censorship is not a value they are willing to compromise on even if it means losing access to several millions of users
*Yeah, filter bubbles exist and Google controlling search results and ads can be viewed as evil but that's a different conversation.
Here's some factors that could be a guide: What do the citizens themselves want? Is the boycott merely symbolic, or is it linked to other boycotts and pressure across a wide front, so that it is liable to have the desired outcome? Are the boycotters committed to long term pressure, publicity, and engagement with stakeholders in the other country?
Former Google engineer here. There's a subtle but significant semantic difference between "Don't be evil" (the real motto) and "Do no evil" (a confusion between the Hippocratic oath and the Google motto).
What I'm mostly interested in is how you can rationalize doing evil while not considering yourself as being evil. Is it based on the idea that you might do evil unintentionally or that you could be coerced into it? Are there other reasons for the distinction?
Do no evil = "No, we are not going to torture these prisoners of war, period."
Don't be evil = "It's OK to waterboard them a little if they deserve it. Remember, we are the good guys, we're here to help."
(See also: rationale for the My Lai Massacre. Very similar thinking, it's possible to excuse awful things when you're the hero(es) of your own (indoctrinated) narrative.)
One question: do they - Chinese people - even care? It's not exactly "good" - whatever Google could have done in such an environment - if you try to force it on an unwilling crowd.
There's an ancient Chinese story where a farmer criticizes an official who exiled himself because the government is corrupt. As the fisherman departs he sings: "when the water of the river is clean I wash my hat in the river, when the waters are dirty I wash my feet in the river". What good can the virtuous official do living out in the mountains? Instead you should adapt your participation to the conditions of the playing field.