It comes from unreleased energy.
Meaning somewhere, sometime You saw an injustice happen. Or You felt something was wrong and didn’t express that in a healthy way.
And now, in order to release that tension, You let it out discussing and sometimes even saying mean things about the other person.
There’s a very specific reason why people do that. In order to feel good and better about themselves.
It can also come from the inadequacies we believe and think we have.
For example, You hear that someone else is more “successful” than You are.
Instead of feeling that pain and experiencing that inadequacy, it is much easier to think of a story in Your mind or use that energy gossiping or talking behind someone’s back.
How to move in a healthier direction?
Feel and experience the feelings You have. Then, from a grounded place either speak the truth of what You believe happened and what You desire instead. And/or take action after that emotional clarity.
Not always easy to do but worth Your while in the long run.