There is a difference between being "turned-on" (I presume this was an erection the man experienced) and having an actual orgasm. Unclear from your post where the electroshock therapy was given, but if the man had back pain, which is most often in the lower spine, I'm going to assume that was the site of the treatment.
Stimulation of the nerves in the area of the pelvic girdle has long been known to produce erections in men, though to my knowledge the reason is still not understood precisely. The phenomenon has been known for centuries, however, but in association with a very unpleasant form of nerve stimulation of a different sort: punitive whipping.
Men receiving a whipping or flogging that includes the lower back and upper part of the buttocks have been reported as going erect. That involuntary response may explain the origin of erotic spanking & whipping, though that's speculation on my part.
Hence I don't find it surprising that stimulation of the nerves of the lower back through electrotherapy would produce a similar result. But again, are you making the assumption that orgasm was also involved, or was that reliably reported? Not that I consider it impossible, I simply don't know if it's achievable that way, and I'm curious to learn.