Here. Part of one answer:
Another interpretation, of course, would be that it was just a reflection of real life — there really were dogs all over the place, doing their doggy things. Many churches in the seventeenth century employed dog-whippers to keep the dogs away, and the well-known painting of Old St Paul’s in London shows a dog-whipper in action, lifting his stick to chase a dog away while other people try to concentrate on the sermon. There is a poem by a seventeenth-century clergyman, writing to his parishioners, which goes as follows:
The churchyard is a sacred place.
Who pisseth there, is void of grace.