This is a story. It's not necessarily true. I could be true. But, there is no written evidence that it is true, so...it's probably fiction.
I intend it as fiction. But isn't all fiction based in reality, somehow? Even science fiction? And horror stories?
Let us begin...
Once upon a time, about 30,000 years ago they say, wolves became dogs. It's unclear without further investigation how wolves came to be known as "dogs" rather than merely tame wolves, but let's not worry about the nomenclature for now.
In our story, a wolf lived on the edges of a small gathering of humans. At some point, the humans - let us not judge them, this is so long ago, they cannot be held accountable - "killed a female wolf and then brought home her pups. Recent studies on silver foxes suggest that when the most docile pups are kept and cared for, it takes just 10 generations of breeding for morphological changes to take effect."
The pups were raised for work. Not fun. Not companionship. Not love and affection.
The humans saw opportunity. The pups from the wolves (this had to be happening in more places than just our little human gathering, don't you think?) over time, became used to being included in hunts, travel, and other household activities. To my mind, in our story, the animals began to appreciate the good life they had with these two-legged, hairless beasts. And the hairless beasts had to appreciate having a creature about that could keep other animals at bay, be used as pack animals to carry items from a hunt, and more. The relationship was symbiotic, as most history tells us.
Over time, the wolves with the tamer, more approachable personalities...became dogs. As they showed their willingness to be submission to the humans, they also likely wormed their way into the home and hearth, from outside the cave door (we are being rather loose with our terms, you understand). And as that happened, I suspect the attraction from the younger folks in the group gradually moved from seeing these animals as merely worker-bees, to seeing them as companions.