Yep they do. They don't do it they don't get paid. They decide to do it, they get paid. They can count the difference in revenue and profit from those two alternatives. It is literally one of the things they are getting paid to do. Can you live with doing that for monetary profit? You can certainly make arguments both ways.
This is not "sanctions against a population." Sanctions against a population is something more like blockading medical aid to Iraq through law for years prior to the invasion. Now Iran. It's certainly worthwhile weighing up the ethics of that, and there are dead bodies to count and trade off that decision, which obviously makes it a pretty unpleasant thing to consider, but that isn't what is under discussion here.
If apple refuse to do it, someone else will, to be sure. That's not a reason that should influence whether you can live with doing it or whether it's something you refuse.