IMHO a significant proportion of whackings when I was at school were, as in Voltaire's interpretation of the execution of the unfortunate Admiral Byng, '
pour encourager les autres, hence the frequency with which they were given in front of the class.
I can't comment for myself, 'cos I was a very good little lad and very seldom got
whacked caught.

However, doubtless the unfortunate boys and girls who were so dealt with for the benefit of their classmates comforted themselves with the philosophy postulated by soooze. I know I did in adult life for my one and only traffic offence. I didn't cross that double white line, but I figured it could have been worse, I might have been got for all the other naughty things I had actually done in my driving career!