There's only one rule for apologizing: You apologize if you actually believe that you've done wrong. NEVER apologize for something you believe was done correctly or in good faith or for "PR" or whatever else.
Every time a person/company apologizes for getting caught, it demeans public trust in everyone’s apologies.
For example, if I make a commitment to somebody and then circumstances outside my control prevent me from fulfilling it, I may very well say "it's not my fault, apologising would be insincere". But to an external stakeholder what they see is they are wearing consequences and I am not accepting accountability. There are a million shades of gray according to how much I could / should have anticipated the eventuality ... but that makes it really not simple to make this kind of call, and I would have to say, if you are going to err, I would rather err on the side of apologising than not.