Many people have different ideas as to where Pup Play comes from, and how it has grown into what it has become today.
Sadly, from a more academic standpoint getting accurate sources for much of this information is difficult. This article tries to keep things brief with as much accuracy as possible.
If you know of any further information or corrections, please do get in touch.
Taking on the role of an animal persona has been a thing in ancient times, with many associating it with things such as "therianthropy" which is much more to do with being able to shape shift into animals. However, some have theorized about this being more around acquiring the mental attributes of an animal rather than the physical details. (Therianthropy on Wikipedia)
Some other evidence comes from ancient rituals and such, but details on these can be scarce.
Other small parts can be found through stories, including many depicting pony play, come from religious texts up until recent times. Sometimes mentioning it as a role of "dressing up" up to acting fully in their animal roles.
During a fair amount of this time, slavery introduces an element of degrading with slaves been referred to at the same level as animals who are mostly seen as lower than humans at the time.
Some slaves in colonial America "...names reserved for dogs and horses. Masters sometimes bought neck collars for their slaves much as they did for their pets. They bridled, haltered...and castrated their delinquent slaves as if they were domesticated livestock. The punishment for running away on the plantation of William Byrd II was the 'bit'." This has elements of current BDSM level of pet play including collaring and renaming those as they see more fit into their role.
Some circus related stories include that of Fedor Jeftichew who would "when he was upset he would bark and growl" (Fedor Jeftichew on Wikipedia)
With the explosion of the internet, things such as Pup and Pet play in general have been much easier to find. Even with various sites coming and going over time, new sites are popping up all of the time allowing more and more people to come and find out about pet play (including you!).
The modern history comes from the BDSM and leather communities with a slave/master relationship. As time went on, some slaves would be degraded into that of an animal, such as a dog. However, many found it to be fun and relieving and for some enjoyed it more of a separate thing.
Tycho from Pupplay.info has some more articles about more modern history of Pup Play in general: