On a chilly weekend in mid-September, the wind-blasted dunes of San Francisco’s Ocean Beach loomed over the Great Highway — two lanes that run along the Pacific coast in either direction separated by a median of sand and ice plant succulents. In a section of the southbound lanes, the Autumn Moon Festival reverberated with a DJ’s tunes. Birds squawked in formation overhead, and squealing children tumbled down the dunes and scribbled the road with chalk. From the top of the sandy bumps, between clumps of beachgrass...