It's all quite random and also depends on genetics. I lived in rural area with very little air pollution, played outside. Yet I got multiple allergies, including hay fever, and hay was plenty in the area. Many of my close relatives have some auto-immune related diseases as well.