Study suggests most dogs display signs of discomfort, stress, or anxiety when hugged by humans.
Dogs are technically cursorial animals, which is a term that indicates that they are designed for swift running. That implies that in times of stress or threat the first line of defense that a dog uses is not his teeth, but rather his ability to run away. Behaviorists believe that depriving a dog of that course of action by immobilizing him with a hug can increase his stress level and, if the dog's anxiety becomes significantly intense, he may bite. For that reason, certain websites, which try to educate children and parents in order to reduce the incidence of dog bites, make a point about teaching children that they should not hug dogs.
https://www.psychologytoday.com/blog/canine-corner/201604/the-data-says-dont-hug-the-dog
Dogs are technically cursorial animals, which is a term that indicates that they are designed for swift running. That implies that in times of stress or threat the first line of defense that a dog uses is not his teeth, but rather his ability to run away. Behaviorists believe that depriving a dog of that course of action by immobilizing him with a hug can increase his stress level and, if the dog's anxiety becomes significantly intense, he may bite. For that reason, certain websites, which try to educate children and parents in order to reduce the incidence of dog bites, make a point about teaching children that they should not hug dogs.
https://www.psychologytoday.com/blog/canine-corner/201604/the-data-says-dont-hug-the-dog