Spanking let's a child know who is boss (when used appropriately).
Children are not stupid, they know who is boss. Would it be appropriate for your work boss to spank you, to let you know he is boss?
Some children are little devils. I know that if I wasn't spanked, I would've gotten away with a lot of things. I grew up very disciplined and learned to never talk back to my elders.
There are other forms of discipline to let a child know what they are doing is wrong, and to learn respect. A child is not afraid or put off by a small slap. They are only going to be intimidated into stopping something in the future if it is a violent beating.
Teaching a child why something is wrong is by far the best way. Since the child loves you, letting them know they are upsetting you or withholding things they want, are also better ways than violence.
Spanking to get a child's attention to avoid a dangerous situation might be appropriate--it hurts less than getting hit by a car, for instance. - WTWizard
Since the age of 3 my child never dares goes near the road, because he is afraid of getting injured. His little 4 year old friend still runs out on the road, despite getting screamed at and beaten by his mother. The hitting does not help him know why not to go on the road. When he gets hit for a range of things, many far less important, it all just falls into the same basket in his mind of not being that important.