system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: I am 30+ years old and just got told that I have peanut allergies. I grew up eating peanut butter and several other peanut related foods. How can I suddenly acquire such an allergy?

A couple of weeks ago I had an allergic reaction while out at a local coffee shop. After getting to a medical facility and having it under control, I went to see my doctor to find out what happened. Blood work was done and it came up that I'm suddenly allergic to peanuts. I am still getting more blood work done because my wheat allergy was slightly high, so my doctor wants to see what my sensitivity to celiac is (not sure if this could be related or help explain things). I've been left completely in the dark by my doctor about this sudden allergy.

I grew up eating peanut related foods on a regular basis. I would snack on a spoonful of peanut butter frequently. If I someone who didn't eat it often I wouldn't be so at a loss. How can this come on so suddenly?
gpt
An allergy is an accidental immune reaction. One of the major features of your immune system is your antibodies. Antibodies are like keys that float around looking for their locks, which are biotic features called antigens. An antigen is a unique tag that living cells produce.

These antibodies are randomly generated in your lymph nodes. There are upwards of a billion possible antibodies in most people and before they are released into your body they are tested for self-similarity, meaning that if your own cells trigger the antibody it is disassembled so that your immune system doesn't attack your own cells. (In some people this doesn't work, and that's how you get an autoimmune disease.) In most cases, your body will also screen out foreign antigens that are known to be harmless (like peanut antigens).

So, why do you have a peanut allergy all of a sudden? In your first 30 years, your body never happened upon an antibody that is triggered by a peanut antigen (remember antibodies are randomly assembled). Now, your body has made that antibody and apparently that antibody made it through the screening process. So, the antibody attaches to the antigen and basically posts a sign, saying 'immune system come find me and destroy me.' Meanwhile, it also sends a copy of itself back to your central immune system with a message that says 'I am a useful antibody. Keep making copies of me.'

So now, unless you happen upon an immune disorder that interrupts the peanut-antigen-antibody making process, your body now things that peanuts are something it's supposed to attack. And voila! Allergies.