"Why do you people like pain? If I stub my toe during sex, I totally lose my flow!"
Ok. Let's start with the basics.
Your pain from stubbing your toe is incidental/accidental pain, and the act of stubbing it was not a conscious or premeditated act. It was an accident, it was unplanned. The pain in your foot is nothing you would ever consider sexy, for you or your partner. I think I can say with certainty that you do not become aroused at the thought of stubbing your toe/someone causing you to stub your toe or someone else stubbing their toe.
Pain, in a Kink/BDSM setting is intentional. It is choreographed. It is a known factor, when it is included in play. Pain is tempered with pleasure, because it brings pleasure.
I often find that the term pain is misleading because it is so purely negative in vanilla conversation. Let us say, rather, that pain is more accurately defined as this:
The elongation, prolongation, reinvention, and intensification of pleasurable stimulation that, when used effectively, allows a fulcrum between the extremes of subspace and total awareness.
"But, seriously, why do people like it?"
Ok. Let's get past basics.
Plainly stated, people like extremes. We like huge cocks, giant boobs, triple cheeseburgers, all-you-can-eat buffets...I could go on. But we like lots of what we love. And we love sensations.
Possible analogies: The pain from a Wartenberg wheel is amped up tickling. The pain from a spanking is a ramped up pat on the ass. The pain from suction is a hickey on steroids.
I think you see where this is going.
Pain comes in every intensity level imaginable, and it serves as a way to stay in the moment. Pain brings focus when used swiftly and sharply between sex acts. It's like sorbet between courses - it cleanses the palette.
It can also be the main course. Pain can turn into pleasure as the body and mind begin to reinterpret repeated blows as foreplay or as the flesh becomes numb and only the pressure is left without the sting; pain becomes titillation as the nipples are always clamped directly before stimulation of the vagina/anus.
Pain can be craved as punishment in Mommy/Daddy play, schoolgirl/boy play, or any number of such roleplay lifestyles/scenes. It's the release, the endorphin/serotonin rush afterwards that provides the sexual pleasure following a psychological purge.
Stubbing your toe isn't fun - but I think you'll agree that biting, sucking, tickling, and a bit of slapping can feel amazing when done in a safe, sane, and consensual environment.