Hi I'm not sure how it happens sorry, but it may be that the underlying allergy had always been there, they just wernt subjected to a high quantity of the substance. I myself have always had a dislike of the taste of pepper, but not until last summer when I was 23 and was filling pepper shakers at work did I have an allergic reaction. up to that point I had only been subjected to the odd small quantity in food and stayed away from anything heavy in the taste as I simple thought i disliked it. When I did react, i had a burning throat, nostrils, lips and a tingling in my tounge, plus watering itchy eyes. Not knowing what was happening my boss sent me to a chemist nearly the pub I work in to ask for some help. The pharmastic said it was an allergic reaction but couldnt understand how I got to the age of 23 before knowing I had the allergym, I told him I hated the taste so didnt eat it, and he said that that was my bodies way of rejecting it due to the allergy. I later found out my grandmother had a bad allergy to it also so thats where mine probably came from.
I had had allergy tests in the past for other things but it had never been flagged before. No more pepper cellars for me!!
I know that an allergy happens when the cells think the forign body is harmfull or attacking it and reacts to destroy it by secreating histamine. I have written a hub on Hayfever allergies which I assume are the same basics as other allergies if your interetsed.
Hope this helps a little