You've got it bass-ackwards.
So why is it Apple being punished for following the agreement with the lawmaker when its the lawmaker who broke the rules. My only issue with this is how Apple must pay for Ireland's actions.
It's Ireland that is being asked to rectify its transgression (and "punished" by being shown not to be able to make such anti competitive sweetheart deals in the future). Apple is not being" punished", just asked to pay the same taxes as any other corporation (that got the "ordinary" sweetheart deal from Ireland)