Bottom line, people do what they believe they'll be rewarded for doing. In the case of men acting like jerks, it's very easy to connect acting like a jerk with specific rewards.
Plus, there's a lot of rewards for dating bad people. Bad people are easier to predict and control. People often prefer the insecurity of knowing something bad's gonna happen over the insecurity of not knowing what's gonna happen. Like the Parliament song says, we descend to that which we love the most.
And then we grow up, and we choose good things we can't predict.
Plus I'm really cute.