Livestrong.com notes that when it comes to important places to keep clean, “your hands hold the key.” That means common viruses are often spread to your mouth via your (unwashed) hands. Similarly, you can get sick by eating food that has been touched by other people’s dirty hands.
You were probably nagged by your parents to wash your hands before meals, and it turns out they had a good point: the source notes you should scrub your hands and wrists before a meal, and after using the toilet. This rule applies even after petting an animal. A good 20-second scrub with hot water should do the trick.