With sexual masochism, I think the conditioning generally starts with fantasies. Obviously this is hard to test, but I still like the explanation because of the parsimony with developing a taste for spicy or bitter foods, learning to enjoy frightening experiences, and so on; in those cases the progression from nonenjoyment to enjoyment seems obvious.
Edit: To (hopefully) avoid seeming naively square, I'm not saying these experiences are comparable or that anyone can learn to be sexually masochistic, only that the formation of these preferences could share a common mechanism.
Followup to Stuck in the middle with Bruce:
Bruce is a description of masochistic personality disorder. Bruce's dysfunctional behavior may or may not be related to sexual masochism [safe for work], which is demonized by most people in America. Yet there are ordinary, socially-accepted behaviors that seem partly masochistic to me:
Question 1: Can you list more?
Question 2: Doubtless some of the behaviors I listed have completely different explanations, some of which might not involve masochism at all. Which do you think involve enjoying pain? Can you cluster them by causal mechanism?
Question 3: When we find ourselves acting masochistically, should we try to "correct" it? Or is it part of a healthy human's nature? If so, what's the evolutionary-psych explanation? (I was surprised not to find any evo-psych explanations for masochism on the web; or even any general theory of masochism that tried to unite two different behaviors. All I found were the ideas that sexual masochism is caused by bad childhood models of love, and that masochistic personality is caused by other, unspecified bad experiences. No suggestion that masochism is part of our normal pleasure mechanism.)
Some hypotheses:
My guess is that, if it's a side-effect (e.g., 3) or a non-causal association (4), it's okay to eliminate masochism. Otherwise, that could be risky.
These all lead up to Question 4, which is a fun-theory question: Would purging ourselves of masochism make life less fun?
ADDED: Question 5: Can we train ourselves not to be Bruce without damaging our enjoyment of these other things?