Most are in desperate situations and are truly hurting. So they see someone do that and they tend to think “that would teach the people I view as hurting me a lesson”. They then commit the act and realize it was absolutely not what they wanted and a stark realization of what they did and what their life will become dawns on them. And so they commit suicide.
This is not a blanket statement, but in general this appears to be what’s going on