Basically, it's because your immune system has a kind of malfunction. The majority of people with food allergies have their malfunction with one or more of eight common food allergy triggers: dairy, wheat, soy, eggs, nuts, peanuts, shellfish or fish. But some have the problem with many other foods, including strawberries. I know someone who is deathly allergic to bananas.
Here is how the Food Allergy and Anaphylaxis Network describes it:
A food allergy is an immune system response to a food that the body mistakenly believes is harmful. Once the immune system decides that a particular food is harmful, it creates specific antibodies to it. The next time the individual eats that food, the immune system releases massive amounts of chemicals, including histamine, to protect the body. These chemicals trigger a cascade of allergic symptoms that can affect the respiratory system, gastrointestinal tract, skin, and/or cardiovascular system. Scientists estimate that approximately 12 million Americans suffer from food allergies.