It's not respect, it's called "fear". It is created in children's minds by their frustrated parents, who in need of an immediate response, don't stop to think and find a better solution, that would be free from agression and humiliating their children. Parents can teach their kids to respect others by modelling, that is by setting an example, being respectful to people  and being respectful to the children themselves. By spanking they can only provide simple conditioning, not much different from dog training, just an automatic fear response in the face of painful punishment. In a broader sense, they can teach them that it's ok to hurt the people you love, that it's the child's fault when someone is hurting them, that agression is a proper response to fear/frustration/anger/exhaustion and that in the future they can say in public this utter nonsense about how they were spanked and turned out to be good people, while in return spanking or plainly hitting their own kids.