Oxytocin is the hormone released when humans bond with each other, babies and pets. Meg Daley Olmert’s book “Made for Each Other” speculates on the original formation of bonds between humans and their pets.
Olmert presents a hypothesis that wolf domestication was a catalyst for the dawn of civilization. Trustful bonds with wolves allowed early humans to sleep the whole night. They trusted their wolf friends to alert them to danger with their bark. Deep sleep, which scientists say is connected to processing information and learning, may have spurred an environment of creativity and innovation.
Both you and your dog get a hit of oxytocin when you pet them. Its drug-like effect tames the animals by masking their fight-or-flight instinct making oxytocin responsible for human-pet relations through the aeons.
(Note: I haven’t read the book. I used the interview as the basis of this post.)