I was divorced just 4 months before I was married. I provided a letter of explanation on my previous marriage, divorce and new marriage. It certainly didn't hurt my application.
As noted, being divorced - even recently - doesn't necessarily cause a problem. The letter of explanation is mostly to make the timeline clear. I did this, too, and had no problems (mind I'd been living with my spouse for several years, just hadn't done the legal/admin step of divorce with my former spouse). Yes, people should understand that the legal procedure of divorce is distinct from the relationship (given waiting periods and court procedures); but sometimes they don't.
We do see cases once in a while here where IRCC has somehow misunderstood the timeline and thought or found the overlap was a problem (eg divorce happened after new marriage, or some issue with common law/ cohabitation). Usually can be resolved if it's just a misunderstanding but likely adds time to the application processing - and if it gets to procedural fairness letter, it can be quite unpleasant (burden of proof).
And - uncommon but non-zero - IRCC occasionally discovers actual problems, like invalid marriages (eg inadvertent bigamy) or various issues with common law.
Anyway, I'm repeating myself - but if a short letter of explanation (emphasis on SHORT and FACTUAL) can potentially clarify things, and avoid problems, then why not?