No matter how much a person works towards improving themselves (i.e. becoming a "better" person, improving relationship skills, attractiveness, etc...), it doesn't mean a spouse will notice, or appreciate, or change their mind about leaving. It's merely one's best chance of changing the dynamics and possibly getting a spouse to see the other person, and the marriage from a more positive perspective. But in the end, self-improvement has to be something you do for yourself.
It's only a chance. And individual circumstances will differ.
But when the divorce clock is ticking sometimes it's about all you can do. Trying to change things, fix things, beg, reason, guilt..... have usually already been tried.
There is no arriving, ever. It is all a continual becoming.