I think recognition and changes to the environment (diversity of foods, hygiene, high propotion of CS births) have a lot to do with it.
(I am aware that I'm going to lump allergies and intolerances together, but despite the different physiological response, the management of avoidence diets is similar and people frequently have both)
DS1 had allergies and intolerances in infancy which he has grown out of (milk, egg, soya). He was an EMCS birth, and although was BFed, had formula in his first days as he and I were both exhausted. He was also whisked off to NICU for a few hours so missed out on immediate skin to skin. His first obvious allergic reaction was early in weaning... with hindsight the head to toe eczema that he already had correlated with trying to give him formula a few weeks earlier through a particularly vile growth spurt. DS2 mearly had a contact rash from tomatoes. Even now he's a bit older, I have to ration him. His entrance to the world was much easier. Probably coincidental but does fit trends. DS1's system never fully settled on the exclusion diet until use of high strength probiotics as it had so many months of being irritated and flushed through.
I've never had a settled digestive system and have been prone to croup, ear infections and eczema. When DS1 was on his exclusion diet, my system was the best it's ever been. As he weaned back on, it deteriorated back to its old habits and I began to spot patterns. I seem to have a low tolerance to dairy (can cope with fatty or well-processed forms) and to soya flour. 30 years ago, soya flour wasn't rife through mass produced baked goods. Curiously, I've never liked milk or consumed much milk to trigger obvious reactions. As an infant I was apparently put on Wysoy milk although it seems a mystery to my mum why that was advised. I've had a much better time with ear infections in adulthood which coincides with living in a smoke-free environment and have been able to take up running without hyperventilating as I regularly did in my youth.
I know only one person who would not be around without epi pens. In a large secondary school, you'd typically have about 1:150 on the list for serious allergies. Traditionally, I think milder ones wouldn't have been identified, and many triggers such as nuts, shellfish and soya were absent from most diets.