https://en.wikipedia.org/wiki/Hygiene_hypothesis
The basic rationale for it is that the human genome did not evolve in a sterile environment, it evolved in an extremely hostile environment, and so developed pretty harsh defense mechanisms, which if not trained (via early exposure) on the appropriate targets will instead learn to target harmless compounds as well as the body itself.