Masochism is 'a sexual fetish characterized by pleasure in being subjected to pain or humiliation'.
The origins of western piercing, when not tied to the SideShow, tend to have a close connection with the BDSM (Bondage, Discipline, Sadism, Masochism) community. Aggressive bottoms found that their desire for pain was well met with piercing, particularly "play piercing" - temporary piercings done for the sake of sensation.
The word itself comes from a man named Leopold Von SacherMasoch. Known for his love of pain, his life and exploits were chronicled in the classic "Venus in Furs".