I've been thinking a lot about this question. A lot of the responses have been really good, and they've made me consider why it was that I personally used to be so attracted to guys who were jerks. Really, I used to be the kind of girl who was just begging for somebody to sweep me off my feet and treat me like dirt. Why was I like that? Hmm...
The main reasons, I'm realizing now, were things that have been mentioned here. I'll keep my sob story to myself, but here's one I thought of that I don't know if anyone else has said yet...
Back when I was dating jerks, I wasn't exactly an angel myself. I thought I was having a lot of fun with how I was living my life, and I had no intentions of changing that.
No truly nice guy would have had anything to do with me at that point in my life. I sought out "bad company" because I was being bad myself. There was one guy, in highschool, who I had a crush on- but he was nice, darn it. He was friendly towards me, but every time I talked to him I ended up feeling ashamed of myself (as I should have!) and tended to avoid him.
Because I didn't want to do what it would have taken to attract a nice guy like that. I would have had to behave, get back into church and youth group, change my attitude, my language, my wardrobe, everything. It was easier to keep going out with guys who treated me badly than to fix myself and be someone worthy of, well, someone worthy.
I think this reason applies to a lot of women, along with so many others.