A study on mice may explain why it's not so bad to get lots of infections when you are young. Many studies show that children raised on farms are less likely to develop allergies than those raised in cities. If your immune cells and proteins do not get a lot of practice and learn how to recognize bacteria and viruses, they may attack pollen, mold, dust and other particles that are not bacteria to cause allergies that show up as skin rashes, nasal and lung obstruction and irritation.
Researchers at The University of Marburg in Germany worked with a line of mice that had been genetically programmed to develop asthma. They sprayed Acinetobacter lwoffii, a type of bacteria found in farmyards. into the noses of pregnant mice, and this prevented their newborns from developing asthma (The Journal of Experimental Medicine, December 2009).
Asthma means intermittent obstruction of the bronchial tubes that carry air to and from the lungs. It is caused by the body's immune cells and antibodies attacking something unknown in the lungs to cause the bronchial tubes to fill with mucous, the inner linings of the bronchial tubes to swell, and the muscles surrounding the bronchial tubes to constrict and block the airways.
When a germ gets into your body, your immune cells and antibodies recognize that the germ has surface proteins that are different from your own surface proteins, and they attack it to try to kill it. This causes swelling and irritation. The Hygiene Hypothesis is that exposure to lots of germs when you are young gives your immunity practice in attacking germs so it will not attack your own body tissues or non-germs such as mold, dust or pollen.
This study shows that exposing a pregnant animal to germs can prevent allergies in their offspring. However, it is unreasonable and probably dangerous to recommend exposing pregnant women to infections. We await further studies to see if extreme cleanliness and protection from infections causes allergies.