While the government should have laws on the books about some forms of corporal punishment, what goes on in people's homes is very difficult to regulate. Children are very unlikely to report their parents when they do something wrong, such as abusing them, so it would be very difficult to enact laws that protected children from even lesser forms of corporal punishment, such as spanking. So, while laws may exist, it can never be fully enforced due to the fact that the victims are too young to report the crimes. That being said, if children do report their parents, or mandated reporters do, then it's up to law enforcement to address the complaints.
Corporal punishment of children should be the job of parents. Didn't people have different standards of punishment. What is fair for one person may not be the way another thinks is fair. Children are in the care of parents until they are adults, as such, the parents should decide the proper punishment.