It is better if children understand what is wrong
Hitting children does not provide them with an understanding of why what they have done is wrong, so they are less likely to avoid the act itself, and more likely to merely avoid being caught doing it.