Any company or individual does have a right to try to pay as little tax as is legally possible, but there is no requirement for a company to pay as little tax as is legally possible because of any obligation to its shareholders to do so.
What you are actually seeing here is the consequence of companies shifting profit broadly generated in one country to another. In this case, Apple utilized a complex structure to shift profit generated in France (and elsewhere) over to Ireland. This absolutely took tax revenue away from France. And Ireland for the most part too, but many gloss over that...
Whether these arrangements are or were "legal" remains to be seen. It's not at all like the often mis-used analogy "well surely you would take all the deductions to which you are entitled too".
I believe that if more people actually understood the details of the typical tax saving arrangements in question, and saw for themselves the lengths that companies had to go to or went to in their quest to make profits essentially disappear, often in the form of transactions which arguably serve little or no purpose other than to facilitate the intended tax savings, there would be a lot less sympathy for all the companies who use them.