There is a theory regarding dog domestication that is basically 'dogs appeared to scavenge for scraps at human campsites'.
But there is a rival theory from Raymond Pierotti and Brandy Fogg that humans and wolves initially came together to take part in cooperative hunting.
Pierotti and Fogg stress the potentially active role played in this by the wolves, observing humans and seeing how they might be useful to them, and suggest that the wolves might even have attempted to show the humans new ways to hunt. A similar thing has happened between dolphins and humans. Where cooperative fishing between dolphins and humans has developed, it has been the dolphins who have initiated the contact.
That's disputed, but it's not so disputed that the process of domestication has affected both humans and dogs. We've domesticated dogs, but dogs have also domesticated us. It's not just been one-way. One of the effects of dog domestication has been a reduction in brain size. Wolves are smarter than domestic dogs.