Pets really do seem to prevent allergies: the more cats or dogs you live with as an infant, the lower your chance of developing asthma, hay fever or eczema.

Source

Petruss [CC BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0)], from Wikimedia Commons

Pet-keeping in early life reduces the risk of allergy in a dose-dependent fashion

PLOS