Here's a better advice. Never apologize, never surrender. If you apologize the attacks don't relent. Instead they use your apology as an admission of wrongdoing and defeat and try to hang your wrong doings over your head so you succumb to their wishes for irrelevant moral bullshit.
You tell them to roundly go fuck themselves and appeal to the people that agree with you, the opposition's feelings be damned.
Both advices have merit, however it entirely depends on the context.
The perceived sincerity of apology delivered to someone who is receptive to an apology can indeed be diminished by accompanying it with an excuse.
On the other hand, an apology delivered to someone who is categorically unreceptive to any apology can only be entirely futile. Since there is nothing to gain yet possibly something to lose, the rational course of action would be to not apologize.
Edit: since the latter example seems to be the controversial one, here is a popular scenario in which a significant number of individuals can always be characterized as being "categorically unreceptive to an apology": partisan politics.
It can absolutely be a valid strategy. I have used both, the true apology without excuses, and the FU one.
It depends. Do i really regret what i did? Was it the wrong thing to do? Then i'll apologise, and try to get rid of all the excuses.
Was someone offended and want me to apologise, but when i look at it, i stick to my guns? Then FU strategy, no apology, i'll fight for my point all the way.
You tell them to roundly go fuck themselves and appeal to the people that agree with you, the opposition's feelings be damned.