Due to insecurities, as they may feel that the other person is different from them, and people might prefer the other person, thus they hurt others, to make themselves feel above that other person, and feel less insecure
you can elaborate yourself, that's just the jist of it