Well if we go back to first principles with dogs...we get to wild dogs and wolves. Now sure -they don't usually live as long as our canine family members, but they eat mainly meat, animal tissues, cartilage and some bone.
They do snack on berries sometimes, and maybe other things, and are likely to eat the stomach contents of a prey animal (usually a herbivore) And grass to a certain extent.
But we never see them devouring a wheat field when out hunting!
So it kind of stands to reason that this is their natural diet. So it must be a "pet" dog's natural diet too.
So I kind of think they would get some grains in the wild, but very little....maybe 5% or even less of their total food intake. Also it makes me wonder....because any grains they do eat in the wild will also have been semi-digested by their prey, so enzymes would have worked on that grain, and stomach acids before they eat it.
That might be a whole different thing to the way grains are processed to put into pet food.
I start to think that some grains are probably okay, and also provide fibre, but only in tiny tiny amounts. Brown rice, millet, and barley etc is quite good for dogs, in very small amounts and can happily be added to home prepared dog dinners in small portions. Even small amounts of corn -so long as it's well cooked and mashed carefully first.
(They simply cannot digest whole corn niblets, and they can cause bad stomach upset. This happened with my own dog once when a visitor fed her corn stripped from a cob!)
But a tablespoonful of well mashed corn with the food occasionally can do no harm.
The trouble with commercial foods, even some of the high-end ones, is that grains make up a HUGE part of the food. And dogs shouldn't be eating grains to that extent every day for years on end. It is far from their basic natural diet.
But then again there are dogs who are allergic to some grains and they shouldn't have ANY.