What are we really talking about, when discussing pain? I assume that we do not talk about pain as the perception of tissue injuries in general. Clearly, we do not speak about tooth ache or injuries due to unintended hurting of oneself - unless it does not create an added value with regard to masochistic feelings.
What is interesting in the context of BDSM is (1) the subjective perception of a certain amount and quality pain and (2) its connection to desire and lust. Only in this context we are able to describe pain as a desireable precondition for sexual feelings and even of orgasm. There is always a double bind of pain in this regard: to seek for and to avoid it at the same time, to enjoy and suffer, to allow and prevent. In this tension pain becomes a means of sexuality.
In addition to these phenomena, there is often a strong psychological connection to what we have perceived as pain related lustful moments in childhood or adolescence. The addiction to pain and the masochistic character develops and ist not created like a deus ex machina. Often this reasons are depply buried under the surface of consciousness. This makes pain so effective, together with the euphoria triggered by the production of endorphins. A good and satisfying pain setting therefore involves not only the (bearable and limited) pain as physical stimulus but also a setting in which central psychological triggers are evoked, e.g humiliation, helplessness or obediance to name only few.
The limits of being able to suffer (and enjoy) a certain amount of pain have to be agreed upon and secured by a safe word - this is especially needed when we talk about pain beyond certain limits. But who decides upon these limits? The difficulty in this regard is, that the specific reception of pain is very subjective. Therefore pain is not measurable and cannot be standardized. Sure, we do have a certain estimation on what is possible and what should not/cannot be expected, but there is no valid advise how far you may proceed. This gives utmost importance to a trustful relationship between mentally healthy partners. To facilitate Safe, Sane and Consensual D/s relationships one has to make sure that the one receiving pain always has to have the last word AND the punisher ACTS as an sensitive caretaker of the punished.
Some words also about the topic of self inflicted pain. It is true that it won' t push limits effectively. It therefore serves more as a discipinary measure than as a punishment. This has to be kept in mind especially in online sessions where the victim has to inflict pain on her/himself on request. Therefore it appears to be more safe than the creation of pain by others. The punished party has control as how hard it will create pain to itself. This can be very thrilling and demanding, too.
So is pain a primal need {like hunger}? Not at all, it is a learned desire and fetish. We could survive without suffering, would'nt we? But, @efetish some of us long for it badly: with the right persons, in the right situation and sufficient rules for both.