I can sort of see that from the masochist angle if you somehow feel the sensation of pain as pleasure. But how does it work for the sadist - they are not receiving physical sensation so is it some rewarding mental stimulation from being cruel and inflicting pain?
There is a bond of trust built between dominant and submissive. The dominant has the ability to deliver pain and pleasure, sometimes at will. Learning and understanding your sub's limits, honoring them, stretching them...is a huge responsibility that dominants thrive upon. Additionally, a game of control can occur....the dominant can control whether or not the submissive feels what he/she craves. This sense of power and control over the feelings of another can be intoxicating. Conversely, the submissive can exert some control of the dominant by requesting more...or not....and by expressing reactions to pain and pleasure....or not.
Done well, both partners gain respect, trust, and an amazing bond. A true sadist only enjoys cruelty, and only a true masochist enjoys having such cruelty inflicted upon them. Many if not most who enjoy BDSM fall well outside that realm, with well-defined and respected limits.