Kids need pain and humiliation. Most social scientists say beating adolescents, toddlers or babies has bad results. For preadolescent children who can talk, results are mixed. Usually, spanking makes children more prone to violence than other kids. Though the children's interpretation of the punishment modifies this effect, it doesn't erase it .
Beating has bad effects in other ways.
So the best results we get from spanking our kids are mixed. But we can get mixed results without beating them. Most kids don't like being beaten. This question isn't just for effect. The answer, I think, is that we want our kids to obey.