Fact 1: a breathing mask is used for keeping harmful particles from entering the respiratory system. 
Fact 2: Allergies are a reaction of the immune system to harmful particles in the air.
A breathing mask can prevent an allergic reaction.