The bond could have grown from the dog's side first - dog is taken into the human 'pack', and as all dog owners know, they have to be put in their place, so they are aware of their position within the pack. Naturally, dogs display the same behaviour patterns in the wild as they do at home, rolling on the back to show submission, being extra-friendly with the pack leaders, and that behaviour could have been misconstrued as affection by the humans.
Plus there is the fact that a human would feel pretty superior having tamed a wolf, and a good hunting dog would be valued highly.