I think your question is based on the assumption that the agriculturist of 100 or 200 years ago knew nothing of nutrition or that the birds were just left to fend for themselves. These animals have been domesticated for many thousands of years, meaning that people have been breeding and caring for these animals for a very, very long time. Even to a farmer a few thousand years ago, it would be obvious that certain species eat certain things and animals that eat specific things tend to do better than others.
So what did these birds survive on 100-200 years ago? Grains, legumes, vegetables, meat and slaughter scraps, dairy products, leftovers from the kitchen table, and whatever else they could scrounge in fair weather. The bottom line is they were fed a variety of food stuffs that provided for their needs. Perhaps it is only in our modern culture where people are so far removed from agricultural practices of the past and suspicious enough of prepared feed in a bag that one would even contemplate feeding grains only.
I have a large number of birds in organic production. They are fed a freshly milled ration of expelled soybean, corn, wheat, field peas, and vitamin and mineral supplements. What is missing from a ration of grains or scratch only? The extra protein needed for good production and the vitamin and mineral supplements. In the summertime, they could probably get the protein, vitamins, and minerals from eating bugs, plants, and earth, but in the wintertime, especially in northern climates, they would be hard pressed to get what they need and are reliant on us to supply them.