Apple ( and other companies ) aren't political organisations. They can express their positions on various social subjects ( which Tim Cook often does), but at the end of the day they have to conform to whatever law is applicable in the country they are doing business in. And that's how it should be, even if that law sucks, even if that government is lead by morons. If there is a law that forces them to do something, they have to obey it , period.
The only either choice is to NOT do business in that country ( which could be the right choice sometimes ).
The only group that should be allowed to decide how things should be run in any country, are its native inhabitants, its people. Not foreign businesses.
It's either that , or pull out of the country ( which did work for South Africa for example, but I doubt it will work for China unfortunately)