I'll wager the right to physically discipline children is one of the most abused rights ever. What I mean by that it, I suspect that in most cases during the during it happens for the same reasons that anyone hits anyone or anything - to satisfy that base urge to do something of a violent nature towards the person or thing that has angered or frustrated the person doing the clouting.
Except that in most other cases you cannot post-rationalise after the fact that your motives were different than what they actually were. "I did it to teach him/her right from wrong" etc. In all the other cases you are stuck with "I did it for my own personal gratification because he/she/it pissed me off".
Note I am not claiming it is always like this by any means. No doubt there are parents who don't just lash out in moments of anger or frustration, they actually are using it as a considered punishment rather than for personal gratification.