We do not really believe that it is a good thing to hit people. Most of us are not 'in favor' of hitting children. We are in favor of spanking and physical punishment. The law attempts to make a physical attack on a child's body a thing that is all right to do. The way a spanking looks and feels must be confusing for children.
Parents are their example of what is right and good.
Hitting a child seems to say that it is all right to hit people. When a person wants to control another, it must be okay to hit them. For parents who say that hitting is wrong, hitting a child might also seem to say that it is all right to do something that is wrong. There is no obligation or duty to hit children. No one of us can show that anything bad happens if we do not hit children.