There’s a term for this. It’s called Anthropomorphism. People often associate a dog’s behavior with human emotions.