RE: Why did early human ancestors keep dog's ancestors?
Personally, I would class all wild animals as dangerous. Some can be socialized to people from living around us, which means they have come to accept certain people as a non-threatening part of their environment. Usually this happens when we feed them. For instance, that squirel you keep giving peanuts to, so now it comes and takes them from your hand. It is not tame, it is still a wild animal. But it no longer fears you, and if someday you don't have any peanuts when it wants them, it could attack you to get them. Squirrels might not seem dangerous (though they can carry rabies), but there was a special on cable (Animal Planet or Nat Geo) a few years ago about a guy who was studying bears up in the wilderness, living with them for several years. They were familiar with him and ignored his presence. But then something changed and they killed him. People think it's cool to own a wolf-dog cross, but it's playing with fire. I learned a lot of this from the Timberwolf Preservation Society near Milwaukee, WI. You're never sure How much of the dog's genes and how much of the wolf's it has. It might seem perfectly tame and friendly, but you never know what might trigger the wolf instincts and it could turn on you unpredictably.
You are making the assumption many people do that dogs are descended from wolves. The current thinking is that dogs and wolves are two different branches descended from ancient canids closer to coyotes or dingos. Bear in mind that humans did not likely go looking for a hunting helper. People produce garbage, which attracts scavengers. If the scavenger is a problem, it's chased off or killed. If it's beneficial, it's tolerated, like small wildcats in Egypt discovering that the graineries attracted mice and rats and were great hunting grounds. They provide vermin control, so they get to stay. Dogs cleaned up food garbage, and if they denned near by the noise they made protecting their pack could warn the humans of threats. They know food comes from humans, and the bolder and friendlier ones might actually approach the humans and watch to see if they throw or drop anything. Some might even beg for food, in the manner of a cub begging food from adults who've returned from hunting. The people encouraged this, and the canids hung around, and later brought their cubs to this food source. The friendliest of those hung around, etc.