People have been eating grass seeds for at least 30, 000 years. That means they have been doing it long before they had agriculture. It also means they have been doing it long before they had pottery or the ability to boil water. The thing to remember is that humans and our ancestors have always been highly omnivorous and highly curious about food. Savanna chimpanzees today still routinely eat grass seeds, adding a lot of credence to the idea that our species has always eaten them… Various hominids have modified the collection and preparation techniques by adding fire, grinding, milling and the use of genetically modified probiotic fermentation vats but really that is just tinkering with a food source that ha been know for hundreds of millions of years, not a new discovery of a food source
The reason why we know that modern humans have been eating grass seeds for at least 30, 000 years is that we have found grindstones dating back at leat that far. Considering that grindstones are both heavy and fragile the chances of actually finding such objects are fairly remote, so the probability is that Homo sapiens has been eating ground grass seeds since before our species existed.
And of course people were still processing grass seeds in exactly the same manner up until a mere century ago, so we have pretty good idea of how they did it, and it’s not complicated. The seeds were collected by hand into a wooden bowl and winnowed by simply tossing into the breeze. The seeds were then ground between two rocks. Mixed with some water or often simply spit and then baked by throwing onto the fire or onto a hot rock. The concept of bread and fermentation seems to have been a very modern invention dating form after the first semi=permanent settlements.
As for how anyone figured this out, we can never know. Of course we can ask the same question about how someone knew that you could take a moving chunk of protein, bash its skull in and burn it to make food. Or how someone knew that you could break open an acorn and extract food.
It has been speculated that hand grinding of any food was discovered in preparing food for infants or the infirm. It was fairly common in many primitive societies to prepare baby food or food for the ill by simply pre-chewing whatever was available, spitting it into the hand and feeding it to the other person. Sometimes it was simply transferred directly mouth to mouth. Someone at some stage came up with the idea that more food could be processed faster by grinding than by chewing. To me that seems like a failry logical leap to make, particularly if you have to prepare enough ‘baby food’ to provide for an ill adult. That’s a lot of chewing.
Of course once grinding was available its benefits soon became clear. Ground grain is far more digestible and hence has a much higher energy value. The same would have been true for cooking. Uncooked grain is largely indigestible to modern humans, and you could probably starve to death living on just uncooked wheat. Cooking makes it far more digestible.
As for the idea that grains were discovered as food from gut contents, it really makes no sense to me. As I’ve pointed out, chimps still eat grass seeds so it’s a reasonable guess that our ancestors did likewise. There’s no need to make them wet and semi-rotten to make them edible. The other problem is that before permanent settlements small animals weren’t gutted, they were thrown onto the fire whole. Large animals were butchered because obviously a whole elephant can’t be thrown onto a fire, but if the tribe has a whole elephant it isn’t going to be worrying about preserving gut contents. The only time I can; see where gut contents might be viewed as a food of desperation would be in a far northern winter where a whole elephant carcasse could be preserved. The problem with that is that in northern winters there won’t be enough grain around to fill an animal’s gut.