This is not the much-touted selective breeding over a great span of time through a kind of evolutionary process of conditioning and selection pressures to make them gentler and more attuned to human ways and interests so they now seek your affection more likely than seeing you as their dinner, this was a deliberate repurposing of the species by Creator to make them suitable companions by giving them human-like characteristics in greater measure than is true for other dog-like species, specifically, the ability to bond to humans and to express love as a high priority when interacting with humans. This is typically expressed only at a minimal level by wild animals, so it is a striking advantage and a true blessing for pet owners.
The reason this was done was to provide a reminder and, in effect, a highly effective teacher about the importance of love, what unconditional love looks like, and provide an ongoing attraction and stimulus to elicit love from human beings. While this is a reward for the animal, it rewards the humans equally well by putting them on a kind of love frequency, and that is both pleasurable and uplifting in a larger sense and provides a path to healing that can be done by invoking the divine realm or by the dog wanting to heal the owner directly. This is conventional wisdom, and many people with chronic illnesses are advised to get a dog because there is a track record of this helping many people to cope with problems of all kinds in their lives. Dogs are great healers and this is done through the love they bring, conveying divine healing capabilities, and applying them where needed. Dogs can see intuitively what humans most suffer and most need to rebalance things and will take that on selflessly, as a project.