Obviously some people live and work in areas where a sweaty climb is unavoidable, but far fewer than you seem to imply. And it helps a lot that it's virtually never hot here.
Having moved from Georgia, it doesn't matter if the route is flat when it's 95 and nearly 100% humidity. That's way more relevant to sweat than the SF hills are.
For a grade over a certain percentage and longer than some duration, it is probably indeed the case that sweating is unavoidable. But you can usually trade a short steep grade for a longer shallower grade, even in San Francisco. The absolute worst portions of SF hills are usually only a block or two long and are much more likely to be found where you live, not where you work.
You can get just as hard of a workout as with a manual bicycle — it's just that you go faster and cover more distance.
However, it also gives you the option to pedal lightly and rely on the motor more, when getting sweaty isn't convenient.
Biking in a hilly place like San Francisco however, there is no escape from being sweaty.