And then it is very easy to destroy someones livehood and future. Or blackmail someone: "raise my grade or I'll tell everyone you touched me". Then the poor teacher with some kind of integrity will never have a job as a teacher again.
Not to mince words, we've managed to humanize the justice system to a large extent, but by no means have we been able to remove the desire of the public to see criminals humiliated and deprived of their freedom, even lives, on tit-for-tat moral grounds. So, while the justice system in many 'civilized' countries does the best it can to be rational, in order to keep the public happy, it also needs to be seen to be sufficiently harsh on crime.