I suspect the movement towards domestication was a gradual process. In the wild, a large animal carcass is often consumed by several species, in turn. Typically, the predators get first pick, followed by several kinds of scavenger.
Once humans were done with a carcass, wild canines who had been waiting on the sidelines would take over. Unlike big cats that would attack the humans, the canines were patient, and realized if they just waited, they could get theirs without having to fight for it.
However, humans learned a trick, perhaps from watching the wild canines, that they could drive a herd of animals to fall off a cliff, and have enough meat to dry it over a fire and haul it a good distance to their permanent camp.
And this abundance was such that the canines could join right in and not have to wait.
In modern times, a Russian experiment with domesticating silver foxes worked very rapidly, in just a few generations, turning these foxes in effect, into dogs.
So when they finally got the chance to domesticate, wild canines did so rapidly.
And the foxes also bark and changed the fur color pattern