Answer:
Pet keeping wasn't generally accepted in Europe until the end of the 17th century, and it wasn't common among the middle classes until the late 18th century. Pet keeping in its present form is probably a 19th century Victorian invention. At this time, it was perceived as a link with the natural world, which itself was no longer seen as threatening. It also allowed a visible demonstration of man's domination over nature.
In present-day societies, dogs have a number of functional roles, from ornamental to status symbol, as helpers, and as companions. Dogs can also act as a channel for personal expression because people express their personality in the breed they own. For example, rare breeds are often used as indicators of status. Guide dogs for blind people and hearing dogs for deaf people are examples of pets who are kept as helpers.
But the most common reason for owning pets in Western societies is companionship. In recent years, there's been a growing awareness of the very positive effects this relationship can have on human health and psychological well-being, and a recognition of the therapeutic value of companion animals.