Look up pics of the golden gate bridge. Look how high the bridge is above the water. When the race starts, you are near sea level and you have a fairly flat 4-5 miles. then you go up a modest hill as you approach the bridge. Instead of proceeding UP to the bridge, you go all the way down to the base of the bridge at sea level and you are underneath the bridge. Then you proceed up steep hills to the bridge. Then the bridge itself is a modest hill. When you get to the other side, you run steep downhill UNDER the bridge again, down to approximately sea level, and run back up steep hills to get back on the bridge and go back across. Running the bridge itself is hella windy too.
Once you're back across the bridge you have significant uphill again. And then once you're past that you're back to more modest rolling hills. After mile 20 you are significantly net downhill, but a lot of that is so steep and your legs are so beat up at that point... Boston is a joke compared to what SF does to you. I had to hit the breaks going down those final hills in SF. My legs were shot.
Hard to find a marathon in mid July with better weather though.
Naturally people are looking up net gain etc. But the nature of the hills plays a huge factor.
Also courses change. At least SF and Oakland I know have changed significantly over the recent years. Like in 2019 the SF marathon did not cross golden gate at all. And the Oakland marathon used to go up past Montclair etc. They're both very different now.