Additionally there's evidence that man didn't initially domesticate dogs. Rather, wolves that were more compatible with humans could get closer and benefit from the interaction, leading to more domestication and closer integration, etc., until dogs.
Of course since then we've done all manner of absurd things to the species (as adorable as some people find them, inflicting pugs upon wolves was terribly insulting).
Funfact: unlike horses and dogs, cats were only domesticated once, and spread with agriculture (to protect stored grain from mice).