I disagree with the interpretation of the picture.

To me, it looks like a 3-way switch was used as a simple on/off switch for something.

That has nothing to do with someone receiving a shock. They received a shock because of inadequate grounding of the metal box, and the wire poking out from the side of the switch. I expect the wire was touching the box.