I have always believed that animals can sense our emotions on a level deeper than we might give them credit for. Dogs more readily accept emotions from us when they do something bad and we are mad at them. They hang their heads or roll their eyes as if admitting the wrong and asking us to please forgive them. In the same respect if I was upset or scared or crying, my dogs would try to comfort me by snuggling in close or trying to lick my face or hands.
Dogs seem to know when we fear them and will often avoid a person who is afraid or is doing something that causes the dog to be fearful of that person. I have had dogs who acted bravely in emergencies and would bark to alert their owners as in the case of fires.
Do you remember that news video on youtube that showed where two dogs had been on a highway and one dog got hit by a car and the other dog refused to leave it's side.
This truely shows dogs have compassion for other dogs, as well as, their owners. And perhapes that is what gave them the title of "Man's Best Friend."