I'm not rejecting that the act itself might have been altruistic. It may have been. I've merely suggested it might not be, that there's no proof it is except incidentally, and certainly doesn't support them being altruistic as a company. The evidence I offer is all the selfish or abusive practices they do at various levels for maximizing their bottom line. That's for them
not being altruistic. Far as acts appearing altruistic, image management and public relations are huge, money-making fields. The reason is that big companies often do something altruistic (or seemingly so) to get people to buy their stuff. Apple has a history of doing that, including with fake security ("Macs can't get viruses!"), to get people to buy their stuff. Given that history & insecurity of their phones, it's right to question whether them championing secure, private phones is a move to create or continue demand for their products given main competition is backed by a surveillance-oriented company. Clear differentiator available that might make them billions.
So, your claim is that a company with many selfish, damaging behaviors fought a legal battle over a case whose consequences might cost or make their shareholders billions depending on outcome and press. That... is consistent with rational, corporate self-interest. Their position also had social value to many & maybe the CEO even paused to do the greater good. That's dogma or speculation at this point given they usually don't focus on public benefit plus are still misleading people about their security & privacy for profit that continues to be hoarded also with few or no investments benefiting the public.
Apple's not altruistic: they're a company that schemed and sued their way into billions in profits. Taking a privacy stance might make them billions more. Or maybe they're just a good citizen on one topic on a few occasions. I'm leaning toward the former but still glad their self-interest and the publics' aligned with them following through on it. All I'm saying on this topic.