Since when is Snape (or any of the staff for that matter) bothered by legality?

I mean, Moody shows the curses! I agree Snape's actions are OOC but they're funny and it's clearly just to get them to shut up as opposed to being for the heck of it. I mean, it didn't look like it hurt or anything.
"I'm not an owl." hehe That was good.