I think the source of that impression is the perspective that the vast majority of bad relationships, or else relationships that ended badly, turned out that way to some degree because of the complicity of both parties. There are many, many toxic and terrible and harmful relationships and very few of them involve one party forcing the other to be there. A lot of times the harmed party stuck around because they accepted that they deserved that sort of treatment, and the harmful party was never made to be accountable for their actions. A lot of times that form of accountability would have come with the harmed party actually leaving, which they didn't do throughout that relationship.
This isn't all encompassing and I understand there are also many relationships where one party is coerced or forced to be there. In those cases I understand and agree with your comment. But from what I've seen in my life, in general a harmful, unhealthy, or toxic dynamic in a relationship involves the complicity of the harmed party and then it's extremely important for the harmed party once they've left to learn and grow out of whatever state of mind made them unable or unwilling to understand that they deserved better and to act on that understanding.
Most people simply decide that they were a pure victim and had no role in their predicament, and that their ex was purely a monster, and so they don't do the hard work of facing whatever made them want to be there in the first place. More often than not they either fall into similar dynamics in their following relationships because of that unwillingness to accept their role, continuing to blame everyone else for situations they choose or chose to be in, or they judge their future relationships as "better" based off of how different it was from the bad one. That perspective is still ultimately unhealthy because it still allows the unhealthy relationship to remain as the "standard" of treatment, even by way of avoidance. It still affords the harmful party all that power.
So yes I think in most cases, when I hear someone speak spitefully on their ex or prior relationships, I sense that it's coming from a place of immaturity by way of an inability to accept one's own role in the situations they find or found themselves in, and I also sense that that immaturity means that they aren't truly past that situation. They won't be until they come to a place of acceptance.