It is, when that very law itself is unethical.
> while I obviously don’t agree with China’s censorship
Oh? And why is that an "obvious disagreement" for you? Are you trying to say something like everyone has a right to freedom of expression? If so, then you should stand with companies that try to promote those rights, rather than those who help remove those rights at the expense of turning a profit.
Last I checked, Apple has plenty of money already. They could have done better, in this case, and set the moral example.