As it is mentioned in the article, babies with the thrifty gene may enjoy eating sugar because in the past their ancestors may have needed to start eating sugar and fats right away for survival. Since there is no way to explain to an infant that they need to eat whatever food is provided for survival, it may have only been the babies that instinctively enjoyed fat and sugar who survived to adulthood.
Allergies to peanuts and gluten may be becoming more common because in the past, most people with allergies would not have survived, because their condition could not be diagnosed. Those who did survive may have looked malnourished, so they would have been less likely to reproduce. However nowadays people can easily be diagnosed as allergic, and can be kept away from the cause of their allergy, without sacrificing their nutrition. Since they can then live to a reproductive age, the trait would get passed onto their offspring, and would be come more prevalent in the