SF despite being dense and having high transit ridership for a US city is still fairly car oriented. If the endpoints of your trip are not near Muni/BART station it's going to take twice as long on transit. And the hills can make the walking part difficult for people who are elderly, disabled, or need to transport items.
The reason it gets so hot in cities is because it's a concrete wasteland that traps heat because of, guess what, cars.
Here's an experiment to show said effect - same city, same day, very different street layouts: https://doemee.leiden.nl/uploads/55aa69e8-fb15-4ccc-8335-9b6...