Cutting yourself as a form of self-punishment also falls into this category. People who focus on the pain are trying to overwhelm any other trivialities which may be distracting them. They are trying to become more in touch with their body and its mortality. A person may grow curious about the sensation. Imitation is also relevant here.
Some youths get the idea for self-cutting by knowing others who have done it.
Curiosity, or a desire to be like that person, will make them try it. Although in this case, it is to gain respect of those who also cut themselves.