In the dog world, when a dog is in an unstable state and you try to reassure them by giving affection, the dog sees you as being in the weaker state than their own. The canine species can read human energy. They read sympathy as weak energy. With their primal instinct to have order in their pack, it is disturbing for a dog in a weak state of mind to be surrounded by other weak pack members. At these times there is no pack leader and chaos is present as no one is providing direction. The same is true is ALL human societies. That is why leaders are elected or allowed to be in place. It intensifies the dog's instability, sometimes to the point where the dog, in their already unstable state, tries to be your pack leader. In the dog's mind, you are now weaker than they are, which instinctually puts the dog in a high alpha position than you. Instinct tells a dog that the strong member is higher in the pack order.