A paper in Pediatr Allergy Immunol asks this question – and it is one of the best questions to ask. Given my sceptical view of farm related explanations I find relief here
The negative association between rural living and the risk of atopy during childhood, which is independent of farming practices, implies that it is mainly driven by an urban living effect.