Is there a good reason we have allergies, or are they just here to make us miserable?

Is there a good reason we have allergies, or are they just here to make us miserable?