SOme people tolerate wheat better than others. I would not be surprised if some cultures a fairly long time ago found that if processed, grain that they probably grew for their animals could also be eaten by humans. I can imagine it now. YOu are hungry. Maybe a mountain lion just ate your cow or goat or whatever. But you have all this grain growing right there. YOu know the cow ate it but you can't eat it straight, but maybe if you ground it up, and you cooked it. Might not be so bad...if you were hungry. After a while, it might become a fallback food for when you couldn't find anything else. And you would gradually learn to prepare it to taste better. PLus this would be a much older simpler more natural form of wheat than is now used commercially. And since grain preparation was difficult and time consuming before machines were invented, it would not be a food of first choice. It would be a food you would fall back on when game was scarce and you couldn't find any fruits of veggies or tubers. So over time, there would be some genetic adaptation to consumption of the old forms of wheat.
But the poison is in the dose and the dose has shot up far faster than genetic adaptation could ever follow. Plus in the last 30 years, it's not just grain but grain oils, plus hydrogenated oils, plus ridiculous tons of sugar, and chemicals and hormones and pesticides. Plus many crops now are genetically modified with genes, some of which even come from animals. SO that plants will produce more lectins, which are poisonous to instects but also to humans. Somewhat ironic that for thousands of years, we probably tried to crossbreed and create crops that were tastier and had less poisons but now we are reversing that to create crops with more poisons, with taste falling onto the backburner compared to resistance to bruising, appearance, ability to ship, etc.
I am willing to bet if we all just ate a little bit of the same wheat our ancestors ate, and we all had to mill the stuff ourselves if we wanted to eat it, well I don't think so much wheat would get eaten in the first place and I don't think we would have all the problems we have. It's not just the wheat, but the kind of wheat, and the amount of wheat, and all the other junk that also is being eaten with the wheat. It all combines together.