The kids I see that have peanut allergies lived in bubbles. It seems like it is self-inflicted but I have no scientific evidence.
replies(8):
The hygiene hypothesis is widely accepted, including by allergists, and there's definitely data supporting it, but we don't understand the mechanism, so it's hard to say that it's about any one specific thing vs. many contributing causes that correlate with hygiene and other aspects of the environment around the kid.
The advice about early exposure clearly works though, and there's data to support that early exposure even after confirming the allergy can increase the chances of outgrowing the allergy.