It's part of the dom/sub fetish -- the idea isn't that you find pleasure in pain (which is a medical problem), but that you're willing to trust someone with the power to hurt you, being -almost- 100% positive that they won't actually harm you.