It would be neat if it there were an option which added distance and elevation gain, but minimized the grade.
For example, a route from SOMA to Nob Hill can be made flatter by approaching from either the east or west. Technically the "flattest" as measured by elevation gain between the two is straight up Taylor from Market, but it's much nicer to bike to the top of Nob Hill by going out of the way (e.g. Polk → California, Embarcadero → Broadway, etc.)
I suspect that this would result in absurdly long routes. Imagine trying to go up a mountain while minimizing grade... you'd end up zig-zagging back and forth endlessly.
a steepness penalty could make sense!
your example (from market & taylor to the top of nob hill) is a nice illustration: (1) straight up taylor is 229 ft of climbing at 25%, (2) via polk and california it's 251 ft at 13%.
as you probably noticed, we only look at the total elevation gain, so taylor "wins"... but I see the argument for preferring an extra 20ft of a more gradual climb.