That's because wolves, coyotes, and other wild dogs that are the ancestors of our domesticated pets often eat carrion. That means bodies of dead animals they find - sort of the natural variety of road kill.
Once my husband had a horrible infection in his hand and none of the antibiotics the doctor tried were doing any good. One day, after weeks of pain, he let our pet dog lick the wound and it improved in less than a half hour. He let her lick it again and again and the infection was completely gone by the next morning.
A doctor friend told us about that enzyme in the canine saliva, but said it would never be used for medical purposes because nobody wanted pet dogs to be used in experiments or to have their saliva extracted.
But if you ever get dog spit slobbered on you or your kids please remember that it's nothing to worry about.