As a kid that ocassionally ate dirt, you're usually fine after it, if you ignore the worms you'll poop afterwards. My point was that it's not sterile even if it's under the sun all day, as UV rays don't penetrate deep, and dirt is a good thermal insulator. Bacteria and parasites, specially their spores/eggs, can be very hardy. It's amazing what our digestive system is capable of handling.
Because if sunlight really sterilized the air, which is transparent, it surely would disinfect every surface it touches. In reality, sunlight does disinfect, but life has evolved to withstand it enough to find a safe environment.
BTW, hospital UV sterilizers work better because they're more intense than sunlight's UV.
I've done it, and aside from not being able to breathe well for a while while you douse your mouth and throat with a garden hose, nothing bad will come of it.