This is one of the hardest things for people who have never been there to understand or appreciate. I think that people try to look too deep into why it goes on:-
"It is a translation of mental pain into a physical one",
it is the person "feeling sorry" for him or herself,
"attention seeking",
even a "cry for help".
All of these statements miss the point of why it is done somewhat. Most people do it secretively and would be embarrassed for others to find out.
The bottom line is it is a switch, plain and simple. You have unbearable mental anguish, you may have had it for days, weeks, or months, and you are desperate for any relief. You hit the switch and it stops. Then you can numb over and cope for a little while without the pain of mind. No deep psychological reasons, just relief. Guilt sometimes comes with relief, coupled with shame (especially if someone finds out what you have done) but for no reason at all...
What needs to be appreciated is, not so much of what is done, ie self harm, but the amount of mental torment the person is in to do such a "shocking thing", as most would see it. Hard to put over but I would say that Cognac and Gadget have it spot on…
Deep, deep understanding is need to get close to even grasping the mindset motivating the act. Very easy to miss-judge and conclude wrongly. (usually condemnatory)
Upsetting to see and hard to grasp unless you know….