Seems to me like a pretty unscientific way to conclude whether a food is edible (or good for you). But it makes sense of course, if you didn't have access to modern science due to poverty or era.
Even modern grain infrastructure relies on delcarations of chemical usage and not itemized testing. Real time testing equipment is prohibitively expensive and lab testing takes too long to do it before mixing a load of grain into a silo. On site tests are done but for indicators of moisture spoilage, protein deterioration and disease, but not chemical contaminants.