The area acts a bit like a heat pump. When the Pacific Ocean is only about 11C here (as it always is, why you need to surf with a wet suit), and the inland valley some 80km inland heats up to 38C, the temperature gradient between the two causes the cool air masses over the Pac Ocean to drag over the coastline and inland. Being near the ocean here, that means a good layer of ocean-cooled moisture and fog gets dragged over the skies.
People here notoriously freeze their asses off in it. For eons Mark Twain has been falsely attributed with saying, "The coldest winter I ever spent was a summer in San Francisco."