Oldest study on the topic:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1626509/This dates back to 1939, and is a rather over the top experiment still:
Accordingly, Davis devised the experiment to let children do for themselves because she suspected that children's bodies instinctively “knew best” what the individual child should eat. Her intellectual model, a view that would later be called “the wisdom of the body,” likened a child's instinctive appetite to the way various autonomic body systems effortlessly adjust themselves to compensate for external challenges — think of sweating on a hot day, and breathing faster when you start to run.
Initially, it seemed that this conceit didn't apply to Davis's test children and their food preferences. None of the eat-what-and-how-much-of-what-you-want infants had the same diet on any given day, week or month. “Every diet differed from every other diet, 15 different patterns of taste being presented, and not one diet was the predominantly cereal-and-milk diet, with smaller supplements of fruit, eggs and meat, that is commonly thought proper for this age,” she told her Montréal audience.
Yet, she and others later saw that the infants' fanatical heterodoxy turned into what appeared to be 15 uniformly well-nourished, healthy children.
... The important bits:
It is actually beyond easy to imagine how Davis's orphans could have eaten themselves sick with healthy foods. Had one or more chosen only meat, fish and eggs, within short order they would likely have come down with scurvy. Had another been a fanatical vegan and eaten only fruits and vegetables, there is a good likelihood that he or she would have experienced a vitamin B12 deficiency and megaloblastic anemia.
Thus, the issue, really, was the extent to which an inner nutrition-seeking mechanism might lead children through the maze of choices they actually would face in the modern, eating world.
PS: Several versions of this experiment have been preformed including some with plenty of junk food, though the setting up an orphanage bit was rather extreme. Also, diets that seem odd are not necessarily unhealthy.