Here is the bottom line: Most people - and especially most women - have low self-esteem. When a guy treats a low-self-esteem woman well, she thinks there's something wrong with him. After all, he doesn't even realize how worthless she is (i.e. how worthless she believes she is). So she instantly loses respect for him, and finds him boring and unattractive. When a guy treats the woman badly, it feels right to her. He must be someone desirable because (1) he understands that she's not worth treating well, and (2) he doesn't waste any of his valuable time, energy, and money treating her well because he has other things going on in his life that are more worthy (including other women). So she responds by being interested, excited, and "on the hook."
Another factor is when a woman has poor relationship with her father. Without delving too deeply into the psychodynamics of this, if her father was abusive emotionally or physically, it's common/normal to fall into a pattern of trying to repeat the behavior in the hopes of finally getting what she really needed from her father when she was young. If a man treats her well, she will find him boring and have no interest, because it doesn't offer her any opportunity to fix the problem. It's unfamiliar. She can't process it. If a man is abusive to her, she is instantly excited. Not only is it what she knows, it gives her the chance to finally get that love and respect she never got from her father. This is so, so exciting to her. The trap is that she cannot, and will not, ever replace that love. The hole can't be filled. If the abusive guy stays abusive (which happens most of the time), she will continually be attracted to him in the hopes she will finally change the result and get love. But if he changes and loves her, it won't feel right. It won't be fixed. The hole will not be filled. So she'll dump him and look for the next guy that treats her abusively.
These feelings and responses can be unconscious and be just as powerful (more powerful, really) a motivation than conscious motivations. Most people do not understand how they, themselves, work.