It's not that dirt is bad. It's just that your young ones haven't been had the opportunity to develop resistance to the protozoa yet, so it can easily overwhelm their immune systems. Getting them exposed to soil before 3 weeks of age, while the immunities of their mother via the yolk are still viable, helps. Medicated starter also helps provide a measure of protection, allowing them to safely develop resistance. Once a bird is to the point of being visibly ill, the only option is a targeted treatment like Corid. Delaying treatment, even a day or two, can be fatal.