The Prophet once spat in his clothes.
P.S. this ‘spit’ is a mixture of saliva and phlegm that’s uncontrollable. So being in a public place, it’s not decent to spit it on the road or a sidewalk. It’s better (according to the Sunnah) to spit it in a tissue/handkerchief/a corner of your cloth. Since they didn’t have tissues back then, Prophet (SAW) spit it out in his chadar.
Narrated Abu Huraira:
Allah’s Apostle said, “If a dog drinks from the utensil of anyone of you it is essential to wash it seven times.”
Reason: dogs are very unhygienic and their saliva causes various disease e.g. rabies.
These are reasons we can think of. But the Prophet (SAW) was much wiser and must have had other reasons. We might not know them. Still, we hear and we obey. Wash dog-licked seven times. :)