My pet theory is that humans captured wolf pups, possibly by dealing with parents first, and kept them around as pets. People love playing with tiger, bear, and wolf pups and keeping them as pets today.
It would take generations of breeding the tamest ones, with the behaviors you wanted, to get something like the beginnings of domesticated dogs.
It also makes me wonder about the longlasting question of speciation. If it happens suddenly, shouldn't that indicate a singular (or near-singular) instance of mutation?
". Within just 15 generations of selective breeding, the experiment had yielded foxes that could live with people."
Maybe they were very tame to begin with? Like the extinct Falkland wolf:
https://en.wikipedia.org/wiki/Falkland_Islands_wolf
"There were no forests for the animal to hide in, and it had no fear of humans;[citation needed] it was possible to lure the animal with a chunk of meat held in one hand, and kill it with a knife held in the other"
Took 3 hours to get to by ferry, and one of the enticements was that "we have these dwarf deer, and they have no fear of man. You just walk up to them and hit them on the head with a stick".
I presume there was nothing larger than a fox on that island, for a deer to have no fear.
I read a book on the history of dogs https://www.goodreads.com/en/book/show/40180044-once-a-wolf
The only thing I remember is he said dogs may have stuck around humans because, like wolves today do with others predators, they could follow them around and scavenge off their successful hunts. But it was also possible the wolves/dogs just really liked snacking in between meals. Wolves are very capable at finding their own food but they enjoyed some meat & bones thrown to them in between their daily rounds. That's what crossed the line between scavenging on the outside and a closer relationship.