I am a big foodie and have been making sour dough bread for 6+ years. I have all the main sourdough books and have been down countless bread rabbit holes on your tube, Reddit and random blogs. I am also a home brewer. Beer is basically liquid bread.
Back when humans were hunters and gatherers (75,000 years ago) they needed to take advantage of any food source they could find. So wild grains were on the menu when they could be found.
What are grains? The seeds of wild grasses.
There is evidence of humans consuming these wild grains and making early versions of bread some 14,000 years ago. They would grind the grains into a flour and add water to make a paste. Then they would bake it and make something that looked like a tortilla or pita to hold cooked meat with while they ate it. Some of the ancient grains you can buy at the store are supposedly minimally changed by selective breeding. It is assumed that these early breads were made with things like einkorn, emmer, spelt, quinoa, millet, amaranth, sorghum, chia.
Around 10,000-12,000 years ago, humans started to become farmers and started cultivating wild crops and selective breeding occurred to develop grains that we don’t see in the wild. Things like wheat, barley, rye, oats, corn, rice have been cultivated from wild grains into staples over the last 10-12k years. An early human farmer would find wild grains and plant them in his field. The plants would grow and produce seeds. The plants that produced the highest quantities and quality seeds were picked and those seed were planted because the early farmers wanted to have more of those qualities in the following yield. After doing this for thousands of years, you end up with grains that don’t appear in nature.
So how did we get from tortillas and pitas to the fluffy leavened stuff that we think of as bread?
The reason why humans stoped migrating in favor of farming was because farming can produce much more food. As farming techniques and grain varieties improved, yields increased. There began to be surplus grains. These needed to be stored. People likely stored milled grain aka flour in bulk so they could make their unleavened bread without having to grind every time. At some point someone’s grain was unintentionally exposed to water for an extended period of time and it started to ferment.
There are wild yeasts in the air, on plants, and even in grains. These are a mixture of different yeast strains and bacterias based on your environment and the grains themselves. When you make a starter, it can be referred to as a SCOBY (symbiotic community of bacteria and yeast). These will likely be some varieties of saccharamyces or candida yeast strains.
You can make this in your own kitchen by mixing some water and flour in equal parts by weight. Then each day remove half and replace with more water and flour. After a week or two you will see it rise as the yeasts eat the starches. When it is consistently doubling in size, it is ready to make bread.
When you add water to grain, you give these wild occurring yeasts the ability to access the starches and sugars. The yeasts eat these and one of the by products is CO2. This causes the bread to puff up. Another byproduct of sourdough fermentation is lactic acid. One of the common bacterias found in sourdough cultures is lactobacillus. This is why fermented bread has a sour taste and is called sourdough bread. Historians are not certain when humans started to do ferment bread regularly, but roughly 4000-6000 years ago is the most popular answer based on archeological evidence in Egypt.
It’s worth noting that beer probably also developed from this accidental exposure of grains to water. There are different steps involved in brewing that reduce/remove lactic acid production in favor for alcohol production. Some beers actually embrace lactic acid if you ever had a sour, then it might have used some bacteria like lactobacillus to eat some of the starches before boiling the beer again to kill the bacteria before adding yeasts to create alcohol. There is even a rumor that Guinness blends in a small portion of lactic fermented beer into their final product to get their distinct flavor profile. But this is a totally different topic.
As people experimented with these sourdoughs, they found more techniques to improve the yeast cultures they baked with. This impacted the taste, shape, and digestibility of the breads they produced. Fun fact, many people today have all sorts of conspiracies about the rise of celiacs disease on the modern diets. The reality of more of these diagnoses are that there is a combination of more screenings and the grains in modern bread are not fermented. Fermented bread is easier for the body to digest. Additionally, some people may be allergic/sensitive to the single yeast strain (saccharomyces cerevisiae) that modern commercial yeasts are derived from. I am not a doctor and I am not telling anyone here to eat foods they are allergic to. Just saying that a person with mild celiacs could probably get away with eating sourdough or at least be less bothered by sourdough vs in fermented bread.
Another thing that impacted the types of fermented bread that developed in each region was the ingredients available. Some grains have more gluten and these breads can hold more CO2 and puff up more while others have less gluten and cause the final product to be more dense.
How did we get from a wide variety of fermented breads to the boring white loaf in a modern American super market?
One of the factors to modern bread is the popularization of white flour. White flour comes from wheat. The wheat berry is ground up. This produces whole wheat flour. The three parts of wheat flour are endosperm, wheat germ, and bran. To make white flour the germ and bran are removed. People have been sifting flour for a long time. Sifted or white flour was often seen as a status symbol because you were rich enough to pay someone to remove the white part and you were in a position where you were turning away calories. Sifting doesn’t remove all of the nutrients though. And in the late 1800s modern machinery allowed for milling to totally remove the endosperm. This caused bread to lose a lot of its nutrients. So you often see “enriched” flour at stores because they have some nutrients added in.
The other key innovation that was needed for white bread was the development of modern commercial yeast. In the 1850s Scientists like Louis Pasteur were able to look at yeast under microscopes. They had the ability to isolate single strains and cultivate those. They could make yeast strains that were more consistent, more reliable, and worked much faster. So bakers yeast became a thing.
Industrial bread makers also added sugar to their products because the newer yeast didn’t add as much flavor as sourdough and the added sugar speeded up the process as well. I am not knocking the process. This type of bread has more easily been able to feed massive amounts of people due to the efficiency faster proofing times it provided. It can take upwards of 6-12 hours to make a sourdough batch. These modern breads can be made in a fraction of the time. But the cost of this is less flavor, sugary bread, and as mentioned above a product that is more difficult to digest.
Bread became a staple because cereal grains store well. Oats, rye, barley, wheat, rice, corn, the kernels of these grains store well as long as you keep them dry and away from pests. How well? They not only store for months the way a potato or root vegetable might in a cool cellar, but they can be stored for years. Given that historically one of the major struggles of nutrition for humans, and all animals, is living through the shortages of food during the winter the ability to store food that can last through not just one but multiple winters is transformative. And that's what the evidence seems to show historically (or pre-historically). Settled agrarian societies had a great many challenges early on in the neolithic and there has always been an argument that things were not much better and perhaps even arguably worse compared to the hunter gatherer lifestyle such societies had transitioned from. But agrarian societies seem to have a simple edge in terms of reducing child mortality through winter, just enough to gain a small but persistent edge in population growth dynamics. And part of that is attributable to being able to store cereal grains for long periods.
But it would seem that there's a large gap between raw cereal grains on the one hand and fully baked bread on the other, raising the question of how you get to such a refined process with so many intermediary steps. The classic "what good is the nub of a wing?" problem. But here the "evolutionary" progression is pretty straightforward. Firstly, start with the basics, that cereal grains were not first consumed only in the form of bread, nor even today are they only consumed that way. Raw wheat kernels are not easily eaten but boiling them or soaking them in water will make them edible. Additionally, they can be ground into smaller pieces which makes boiling or soaking them all the easier, and makes them much softer and easier to eat. This process of turning cereals into porridge is very, very old and dates back to at least the neolithic. Partly because porridges are simply easier to eat, but likely substantially because they are easier to eat for infants, which goes right back to the whole value proposition of settled agrarian life in the first place. Globally it has been a very common way to eat all kinds of grains and foodstuffs, from rice to corn to wheat. Cream of wheat, oatmeal, grits, and congee are all still very common ways of eating cereal grains in the form of porridge, among countless other surviving variations. And the practice extends even to other foods such as milling acorns into meal that (after processing with lots of water to remove the bitter tannins) can be used to make a porridge. These are old techniques, and were part of the toolkit of even hunter gatherer neolithic peoples to process foods.
As it turns out, porridge is a step along the road toward making bread. The process of grinding wheat or rye into meal will quite easily dovetail into finer consistencies that become types of flour. If you're making a porridge with very fine meal or coarse flour of a glutinous grain then you will very quickly find that mixing that flour with water will produce a dough. From that it is a very straightforward process to simply cook the dough, just as you might cook anything else. This is how you discover unleavened bread, of which many varieties are still regularly made and eagerly consumed (from roti to matzo to tortillas). Flatbreads offer a much different texture, flavor, and form factor for being able to consume cereal grains, and it's not surprising that they became popular after discovery. One particular use of flatbreads, which is still very common globally, is its use as a utensil or a container. Combining flatbreads with cooked meat or vegetables, even in a stew like consistency, you can either place the other foods inside a flatbreads (as is the case with something like a taco or a gyro) or you can tear off chunks of bread to grab bites of other food. Once these simple flatbreads are invented it's easy to see why they would become popular, which then sets the stage for the next evolution of breads, beginning from a point where people would then be making flour and doughs routinely.
The thing about raw dough, mixtures of flour and water, or even porridges (mixtures of meal and water) is that they inevitably contain their own little micro-biome of diverse populations of organisms from nature. If left alone for a while those organisms will proliferate into a culture. Sometimes this can be some manner of "spoilage" where the culture renders the food dangerous to eat. But sometimes the winning culture ends up being a symbiotic population of yeasts and lactobacilli. The bacteria produce lactic acid which lowers the pH of the culture rendering it inhospitable to microorganisms other than the lactobacilli and the yeast. The yeast produce alcohol and CO2 gas. Almost any society that routinely made use of dough and porridges would stumble across this fermentation process at some point, especially for wheat, rye, oats, and barley. And with that it leads you down the road of using fermentation for making alcohol and for bread. The first leavened breads were all sourdough based and likely simple leavened flatbreads such as pita and naan. If you simply work a glutinous dough enough to develop the gluten structure then cook a ball of dough you will end up with a loaf instead of a flatbread, and from there it's just a matter of trial and error to experiment with how to work the dough to produce different outcomes in terms of texture.
Even though making flour, managing a sourdough starter, mixing dough and incorporating the starter, working the dough the right amount, allowing the dough to sit and rise the right amount, then baking the dough seems like a lot of complicated steps in order to get right there is a natural progression to get from square one (having a collection of wheat kernels that you try to eat in the lowest effort way possible) to the "ultimate" destination of a modern leavened loaf being produced. Interestingly, many of the intermediary steps are still around and still culturally relevant, from porridge to unleavened flatbreads to sourdough starters and fermentation to leavened flatbreads (including pizza crust), each a discoverable stepping stone that would have come up naturally with extended use and experimentation using the "ingredients" from each previous step. If you eat oatmeal in the morning, a soft taco for brunch, a slice of pizza for lunch, and then a burger with a beer at dinner then you'll have walked through the whole evolutionary process of bread and beer making in a day.
There is an interesting debate about whether the popularity of growing cereal grains especially in Mesopotamia was propelled more by the desirability of storable foodstuffs or the desirability of making alcohol. Very likely non-settled humans would have begun the process of harvesting wild grains and using them in the form of porridges and such-like and so might have discovered the boozy benefits of leaving porridges out for a while. Some folks think that this became the driving factor to begin intentionally planting and growing more such grains, with settlements and grain eating becoming something of an accidental byproduct, though that's generally a minority belief and the evidence for it is not terribly strong, it's mostly just an interesting idea.