I think this intelligent business is largely down to anthropomorphisms. You have the classic scene in a movie where some character has just been through some heart wrenching experience and the dog can see that he's sad so he goes over to comfort him. For a human this behavior is very complicated. If we see someone in a condition like that character we have conflicting thoughts. "Oh he's hurting, I should go comfort him." On the other hand "does he want to be alone, will I only make him uncomfortable?" And then there's meta thinking like "If he'd rather I not go over there it might be because he thinks that I don't understand him." etc etc. So when we watch a movie and we see a scene like this between humans, we're conscious of the complexity of it. But with a dog there's no such thing, dogs respond to emotions, that's it. They only notice physiological factors about. That's also why no human would reject a dog in this scenario, because the dog is a simpleton and doesn't come with the complexity of human interaction.