The most interesting theory is the one of being trapped. During a fight, you might begin to feel like you are stuck.When faced with a threatening situation, the area of the brain associated with panic begins to lighten up. With the feeling of a threat, we lose control. The article claims that in order to get our own control back, we may have to hurt ourselves, which is why we would allow sex during a time of hurt.
PsychologyToday--Sex and Other Forms of Self-Sabotage
FoxNews--The Science of Makeup Sex