Your concern has a real basis: **wet flour at room temperature can support harmful microbes. A well-maintained sourdough culture changes that environment, and baking supplies a further safety step.** Colorado State University’s food-safety guidance explicitly addresses both protections. [CSU Extension](https://extension.colostate.edu/resource/sourdough-starter-best-practices/)

The main mechanism is **acidification**. Lactic acid bacteria grow alongside the yeasts and produce lactic and acetic acids. These make conditions increasingly hostile to many foodborne bacteria. The sourdough organisms tolerate those conditions and become dominant—a process called *microbial succession*. In a 2021 study following six sourdough batches, all reached a pH below 4.0 within six feeding cycles. [Microbiology Spectrum study](https://journals.asm.org/doi/full/10.1128/spectrum.00662-21)

Regular feeding helps maintain that community. Each feeding carries a substantial population of established microbes into fresh flour and water, so fermentation and acid production resume. Starting a culture from scratch takes several days; freshly mixed flour and water has yet to develop those protections. [CSU Extension](https://extension.colostate.edu/resource/sourdough-starter-best-practices/)

There are limits:

- **Acidity inhibits growth; it does not guarantee sterility.** Raw flour can carry pathogenic *E. coli* or *Salmonella*. Treat starter and dough as raw food, and cook them before eating. [FDA flour-safety guidance](https://www.fda.gov/media/157257/download)
- **A starter can spoil.** CSU recommends discarding the entire starter if mold appears and thoroughly cleaning the container before restarting. Baking is not a recommended way to salvage a contaminated starter. [CSU Extension](https://extension.colostate.edu/resource/sourdough-starter-best-practices/)
- **Maintenance matters.** Use clean equipment, keep the starter loosely covered during fermentation, and follow an established feeding routine. Refrigeration allows longer intervals between feedings. [CSU Extension](https://extension.colostate.edu/resource/sourdough-starter-best-practices/)

So the safety argument is conditional: a maintained culture produces an acidic environment that limits harmful microbial growth, and the resulting dough is cooked before consumption. Simply abandoning a bowl of wet flour in a warm corner gives you much less control over the outcome.