I recently read in a gardener's book that playing in the dirt increases the Seratonin in the body. Bacteria in the soil produce it.
Seratonin is valuable to the gut for digestion and the brain for producing Melatonin, the sleep cicadian hormone.
So don't get into a shampooing craze when your dog rolls in dirt or eats dirt, it will try to use it to regulate it's intestines.
I always knew eating dirt was associated with worms, but didn't see the bacterial connection or the Seratonin angle.