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.