As in Boston, the atmos of the Bay Area is probably the main reason the universities here are so good. Universities planted in Boston and the Bay Area thrive. Those planted in cities that are bigger and richer, but have the wrong sort of culture, don't do as well. E.g. NYC vs Boston, LA vs SF.
You keep conflating San Francisco with the greater Bay Area. This mistake was my central point. San Francisco proper is a small part of the Bay Area. It has a more storied history and is the more widely-known, but it is far from being the most significant city when it comes to defining the culture and norms of the area. SF gets the press, but Berkeley, San Jose, and numerous cities up and down the peninsula contribute just as much to this tech hub as San Francisco.
When the universities' reputations were established, SF dominated the Bay Area. Till suburbia spread down the peninsula in the 1950s, what we now call Silicon Valley was mostly agricultural land.
San Jose's population in 1940 was 69,000. SF's was 635,000.
Shockley did not come to the bay area for San Francisco, he came to be close to his ailing mother in Palo Alto. From Shockley Semiconductor came the traitorous eight and Fairchild and from this cluster came most of what we now know as silicon valley. Hewlett and Packard both came from Stanford, etc.
SF may have dominated the bay area for quote a while, but none of the seminal events that can be pointed to as the seeds of what became silicon valley have a very direct link to what you and everyone else seems to consider the San Francisco "culture." The marine geography that makes San Francisco a great anchorage and led to a strong naval presence in the area probably had a bigger impact on silicon valley than anything you can point to an as a uniquely "San Francisco" impact on the valley.
The critical moment in that story was not when Shockley moved back to the Bay Area, but when the traitorous eight decided they wanted to find a way to remain here, even though they couldn't stand working for Shockley anymore. Of the eight, I believe only Moore had family here. The rest wanted to stay simply because they liked it.