A very small minority of children, for whatever reason, are creatively vicious in their behaviour towards teachers (or some teachers, or maybe just one teacher, whilst being perfectly civilised in someone else's lesson.
(One reason why it's bad form to say 'Well, she's all right in my lessons', in the staffroom...).
Bullies pick their victims: the ringleaders in this instance picked a teacher who had been off sick & whom they sensed to be vulnerable, & whom they thought could be got to explode entertainingly - tears, swearing at them or going home & topping himself would all have been satisfactory reactions.
Of course the teacher's actions were awful & I don't think anyone's seriously upholding them as 'how to deal with little shits'.
But the wider causes are that 'decent' kids in a group dominated by a determined bully out to 'break' a teacher, will go along with it. Stanford Prison Experiment, anyone?
SLG should've been aware of the deteriorating situation (although often a 'not coping' teacher, especially one who has previously been successful & well-regarded, will not feel able to ask for help).
We need wider awareness of 'student on teacher' bullying, & a culture where its victims don't feel that they 'should' be able to deal with it - up until the second when they snap.
It's happening routinely in schools across the country - it's just that usually the teacher concerned loses their marbles quietly & without hurting anyone else.