Teachers don't generally come into school one day and decide, "I'm going to go slap a kid around some." There was something that led up to it.
No matter what that "something" was, she shouldn't have done what she did. But having seen what some kids that age do to each other, and how they respond to authority figures telling them to knock it off, I can easily understand wanting to do it.
When a kid pokes a dog with a stick until the dog has had enough of it and mauls him, you put the dog down. And at that point you have to. But you can still recognize that the kid brought it on himself. And you can expect that when the kid tells his version of events it will have been an unprovoked attack.