The question is never why do we attract "bad" people sometimes, but rather, why do we STAY around them when we feel they are "bad for us".
Sometimes, people come to therapy to try and understand, or complain about, the narcissist, the greedy, the liar, the violent, the egocentric, or self-centered they have in their life.
The only way out is when the focus and responsibility are turned back on us.
On why we think we need to stay.
Having said that, there is no bad person.
Just people who are still alive, and therefore, not fully "finished" yet.
People who can still climb up the emotional scale and hit the next available ladder there is.
A narcissist, for example, is actually a very sensitive person who can, actually, evolve.
He, or she, simply never got passed the stage of "I need the whole world to meet my needs", probably because they had to go through childhood without having their own needs met, because of their own narcissistic parents, and therefore, don't know, yet, how to relate to the world from a grown up perspective.
Thus, there is no one to condemn, or judge, for if we go back in time, everyone is "guilty" of something and left scars into someone's life.
The consequences of "sins" , "mistakes" , or "bad decisions", affect people from generation to generation; until someone comes along, whose soul purpose and level of consciousness are sharp enough to end the "karma".
Therefore, leaving is a loving way out.
Leaving also allows a space for dignity to remain, protecting the ego from getting too hurt, and creates an open setting for further sharing and exchanging to maybe take place, from a respectful and reasonable distance.
Leaving lovingly invites change, tolerance, and benevolence.
We do not need to understand or help everybody, for not every fight is ours.
The way of a peaceful warrior, with no drama, is a wisdom, and an art that can make miracles happen, and long lasting friendships blossom.