I long pondered the answer to this question myself. The short answer is: Cognitive Dissonance*
("Cognitive Dissonance" is a hypothesized mental process in which two conflicting ideas are resolved through rationalization / attitude change, instead of addressing the underlying source of the conflict that the person may not be consciously aware of. So here, we see two conflicting ideas - "I am being abused" and "I am not leaving" - resolved through a rationalization - "I love him", instead of addressing the underlying source of the conflict that the woman is not aware of - eg, "an addiction to the good times in the relationship." More detail and references below.)
Long answer:
Research approaches to answering such a question are limited by ethical concerns, so most data on abusive relationships comes from self-reports, and most studies are conducted after the fact, though a few studies do examine self-reports during such relationships.
Reports of "love", "romantic narrative", or "emotional attachment" are common in such interviews, and often cited as the primary reason for staying. However, like many other reasons for staying, victims often change their mind ("what was I thinking?") after break-up and recovery. This suggests the possibility that emotional attachment may be a rationalization.
Real reasons for staying:
The likelihood of remaining in or returning to an abusive relationship is well predicted by other factors, such as economic dependency, social support, cultural factors, and characteristics of the abuse and the abuser. This further supports the possibility that emotional attachment is a rationalization of an underlying reason that the victim is either unaware of or suppresses.
Consider another factor: In behavioural experiments, an intermittent reinforcement schedule is considered the most powerful schedule for addiction. Abusive relationships typically involve a "cycle of abuse" (ie, intermittent) pattern. Thus, "addiction" to the "good" periods of an abusive relationship may constitute the real reason for staying in some cases.
Rationalized reason for staying:
Dutton and Painter (1993) report that in their sample base, emotional attachment was highly correlated with intermittent abuse. As is typical of addiction however, victims do not usually recognize the real reason behind it (eg, an intermittent schedule of abuse), and rationalize other reasons instead (eg, emotional attachment).
Dare, Guadagno, and Muscanell (2013) review the role of Cognitive Dissonance in abusive relationships:
Women in abusive relationships may experience high levels of
dissonance resulting from their negative attitude towards the abuse in
the relationship and their inability to leave the relationship. If
they feel "trapped" in the relationship, they may be inclined to
change their negative attitude pertaining to the relationship or the
abuse, whether they know it or not. ... Once the woman commits to an
attitude change that results in her adopting positive feelings towards
the abusive relationship, she will continue to have those positive
emotions due to the human nature of wanting to remain consistent with
our thoughts and actions; therefore, reducing dissonance. ...
Eventually, her experienced dissonance will be at a minimum because
her actions and attitudes have become consistent – she remains in the
abusive relationship while developing a progressively more positive
outlook on the relationship. This does not mean she thinks abuse is
acceptable and wishes to be in a violent relationship, rather she
feels most comfortable within the relationship whenever her cognitive
dissonance is at a minimum.
Victims effectively convince themselves that they "love" their partner as a rationalization of their real reasons for staying in order to reduce their Cognitive Dissonance.
*-Note that Self-Perception Theory is an alternative to Cognitive Dissonance Theory that makes essentially the same prediction in this context, so there is no particular reason to prefer one interpretation over the other.