Leaving aside abuse and infidelity, I think what is very common when longstanding relationships end is that one partner has been trying for a long time to get the other partner to meet them half way about issues that are not working between them, or at least to look at, and discuss, those issues in a constructive way.
When you have children, work, financial and wider family commitments etc, it can take a considerable amount of time to circle back to unresolved problems enough times that you are ready to face the fact they will never be resolved, and then a chunk more time while you try to weigh up what is a dealbreaker and what you can live with. Eventually, for some (including me) you come to see that either the problems themselves, or the resentment you feel at the lack of engagement, are too big for the relationship to continue healthily.
Whether you are then seen as the 'bad guy' I think depends on how deep is the denial that led your partner not to engage with the problems at hand. If they genuinely believe that they were an attentive lover, an engaged parent and met you half way with the housework (or whatever) then your decision to pull the plug will paint you as cruel and unreasonable in their eyes. If they know full well that they've been kicking the can down the road, then probably not so much.
Family narratives around which of you habitually plays good cop or bad cop with your kids or your inlaws or with errant tradespeople etc can act as complicating factors in how you each cast yourself in the drama of your separation. I'm sure there are other examples, such as group dynamics for couples who socialise in flocks, for example. If one partner is in deep denial or has the unquestioning support of family or friends, then who grasps the narrative (or even the fact that someone does grasp the narrative) can have a big effect on how the separation plays out.
I'm not sure how much of this makes sense. It does in my head, but then I have the benefit of thinking about it in the context of my own recent separation, which contained elements of all of this. I don't feel like the bad guy, but who knows what's being said behind my back, lol.
Certainly I think it's way more complicated than the leaver = the bad guy, and a good thing too, because imo the leaver is often the brave one. (Though I may be biased of course.)