Our lifelong food preferences are largely shaped by the foods we're exposed to early on in childhood. This process begins even before we first taste solid foods. If introduced early enough, we'll happily accept flavors that our own parents might turn their noses up at.
For instance, there is an infant formula designed to aid digestion, which has a bitter aftertaste that parents find unappealing. They assume that their babies couldn't possibly like it. And if they wait until their babies are seven months old to introduce the formula, their assumption will probably be right. However, if they introduce the formula to the child within its first four months of life, the baby will accept the formula and continue to accept it.
If a mother eats a varied diet, then her breast milk can naturally introduce a wide variety of flavors to her baby early on. For example, if a mother breastfeeds while eating lots of vegetables, her baby will be exposed to the flavors of vegetables through her breast milk.
The wider variety of flavors children are exposed to, the more likely they are to eat a varied diet later on in life.
"First Foods Shape Our Taste Buds" (BBC)