Microorganisms living under the fur and on the dog's skin, such as yeasts and bacteria, are the biggest causes of it. Microorganisms produce chemical compounds as waste.  Wet fur causes microorganisms to be dislodged and the smell from those microorganisms will reach you more quickly.