Read up on Traumatic Attachments/Attraction, Betrayal Bonding or even Stockholm Syndrome to understand the dynamics.