To be sure, dog do have affection to humans. But some of their behaviors have more to do with power than passion. Dog constantly try to establish their rank within a group. This is a deep-rooted instinct that has been passed down for centuries. Dog inherit it from their wild ancestor, the wolf.
Dog have been living with humans as pets for thousands of years. Yet they still speak the language of wolves. This language includes instincts to life as member of a pack.