Historically from pre history and the most primitive peoples those who were able to form a bond with semi domesticated wolves survived. They had working partners and protection against predators. Of course that would become a genetic predisposition.
I was reading a study not long ago that found that women who slept with a dog in the bed had deeper sleep and longer rem sleep than women who slept alone or with a man. Among primitive people women who slept with a dog survived more than women who did not.
The relationship between humans and dogs is probably the deepest relationships there are.