I'm working on a brief introduction to the sourdough bread process, and since I live in San Francisco, people keep asking me why San Francisco has such an extensive popular connection with sourdough.
I'm inclined to think that it has something to do with the Gold Rush, but I've seen a few references to suggest that might be something of an exaggeration.
Not sure if this might fit better in /r/askculinary or /r/askscience (If there's a microbiology reason, that might make sense), but I'd love some discussion of how sourdough came to be the more-or-less official bread of San Francisco.
This is a history and science question in my opinion. From the historical standpoint, you're right about how the Gold Rush influenced the development of the San Francisco sourdough "brand". Making a sourdough bread is one of the most convenient, durable, and easiest forms of making bread which was definitely a staple in the western pioneer/gold prospector's diet. Not just San Francisco made sour dough bread of course. Anywhere with a glutinous grain tradition (barley, wheat, etc.) made bread. So why did the sourdough of San Francisco take off and not Chicago or St. Louis? Well San Francisco like a lot of cities in the mid 1800s American west attracted immigrants from the eastern US and foreigners too. One of those people who came to San Francisco seeking wealth and opportunity was a French Burgundy guy named Boudin. He was a baker in France and after realizing the gold rush was a boom and bust type of deal, he sought to bring his French baking traditions and techniques to America. He fell in on the sourdough he had seen other miners using and started his bakery in 1849. The bakery still exists and they supposedly use the same mother starter as they did when he was still alive. Before the mass industrialization of bread in the early to mid 20th century, every town in America had bakeries and people either got their bread from their local bakery or they made it themselves. The nature of the breads took on regionalized qualities that reflected the climate, water, type of grain used, and strains of yeast that propagated themselves wildly and in more controlled conditions. What happened after world war II was the mass scale prodution of bread. It got cheaper, faster, and produced more. Of course quality suffers when you do it the quick and cheap way but, that's what happened. The result was the ubiquitous Wonder Bread style of bread that was soft, not fermented, mild flavor, uniformed shaped, and drier dough than the hand made methods of bread making. As Americans switched away from making their own bread or buying it from the local baker and moving away from centralized urban areas to the suburbs, the demand for this mass market bread increased and old style bread decreased. In San Francisco, however, the sourdough method employed remained popular and many of the bakeries stayed open and continued to preserve the strains of yeast that were present in all the starters used. The 1980s-90s saw the beginning of the "artisinal" revival of bread in America, and San Francisco being San Francisco, was poised to take advantage of this renewed tradition that had escaped the rest of the country but never quit left there. Hence why San Francisco Sour Dough has become a brand almost.
tl;dr: San Francisco like every else in the 1800s made its own bread the old fashioned sour dough method thanks to the gold prospectors flooding the area wanting an easy method of making bread. San Francisco resisted more than other locals the mass production of bread making and kept its tradition. the 80s and 90s saw the artisan revival of bread making and they took advantage of marketing.