There is pretty conclusive evidence that beer was made millennia before bread.
So imagine this:
You're a nomadic human in a band of a dozen or two other people. You roam around killing the occasional animal, collecting the occasional fruit or vegetable. Things aren't bad, per se, your group has its **** together, knows where to be at what time of year, has a few spots prepped for next season, all that super advanced stuff. You guys are doing it right.
Then, one year, you collect some grain from your normal spot. You put it in some of the fanciest pots your tribe has. You hit your local cave and set up camp. Clouds collect and you all figure it's gonna rain. You put the pots put to collect some water and to soften your grain. Before the weather breaks another band comes along and pushes you out of one of your favorite caves. You move on. Before the end of the warm season you come back. You know where you stashed the grain and you come looking for it. There it is, only it tastes a bit off. You're all pretty damn hungry so you put it in a pot and boil it for a second. As the hot porridge goes around it's pretty clear the mood is lightening. Laughter, happiness, connection. As you all gorge yourselves on the porridge you start feeling a bit different.
Next year you set the pots of grain out on purpose and leave them for the summer. In the fall you return for the porridge party.
Next year you do it again, it's starting to get to be a thing.
Fast forward 100 years. There have been a few who have devoted themselves to making this special porridge. They can make it as long as they have grain and a fire.
Fast forward a couple more years, everyone decides they want special porridge all year long. They establish a permanent settlement and start growing grain.
Fast forward...modern civilization.
That definitely happened somewhere along the way. Thinking on the fly, my main thought is why were these nomads eating inedible grains in the first place? Did some cave lady declare her human right to be an animal and happen upon some hybrid weed that somehow contained enough nutrients to sustain her?
At some point they figured out how to breed crops for yield. I could see a drunk cave dude putting his best interest at heart to keep the buzz going.