system
Given the following post, respond as if you're commenting on Reddit:
human
Why are there common food allergens?

Peanuts, tree nuts, soy, shellfish. 

Why are people more likely to be allergic to the above and not other things? Why peanuts and soy but not other legumes?
gpt
A theory of why people seem to be developing so many more food allergies is not just because or food sources are more globalized than ever, but due to the inflammation response. Your microbiome (all the bacteria living in your body) have a big effect on your immune system and how it responds to external factors. Breast milk selects for very specific bacteria in your gut that aid with development and your immune response. Many mothers have gone towards formula with "prebiotics" in them which enrich for bacteria, but are no where near as specific as human milk oligosaccharides.

Also, the diversity of the mother's diet can also have a big effect on food allergies. If the mother is a picky eater and tends to avoid certain foods or food groups, it is more likely that the offspring will have allergies to those foods. Again a lot of this stuff comes down to the antigens you are exposed to early in life, your microbiome, inflammation response, and how your immune system reacts to foreign antigens.

TL;DR Breast feed your children, eat a balanced diet to maintain good bacteria in your gut (also drink Kiefer)