How can starting a certain food too early cause the baby to have allergies?

What happens when an infant has food allergies?