I read a fascinating short report on San Francisco Bay Area microclimates that this view illustrates well:
You can see the Pacific Low northwest of California that, due to Coriolis force, is going south along the coastline once it reaches the US West Coast. In the summer, it pushes warm surface water southward, exposing cooler, deeper water. The cool, moist air has only one spot along the coast to break through the coastal mountain range of Northern California: The Golden Gate, where it rushes over San Francisco on its way to the warm central valley, forming low clouds and fog, blotting out the sun and making San Francisco foggy, cold, and damp. As summer ends and autumn starts, the central desert cools and the Pacific low moves a bit toward China, and the wind dies down, and skies clear, and SF becomes warm and sunny as autumn starts. Around the world, there's always a difference between the summer equinox and the warmest days, but because of this unusual set of phenomena, it's really long -- almost three months -- in San Francisco.
Source: Weather of the San Francisco Bay Region, Harold Gilliam, UC Berkeley Press 1962.