Probably what happened is that the snake tried to crawl under the electric fence and at the first shock lashed out with a bite to whatever it was that it felt was hurting it. The teeth caught caught up in the wires and the snake could not extricate itself. With both the upper and lower jaw caught on the wires, there was just no way the snake could get itself loose.
Speaking of electric fences, years ago a guy I used to work with gave me this sage advice....
Don't EVER urinate even NEAR an electric fence......