You know that got me thinking, biking rules vary far more than for cars.
Depending on your location, pedestrian traffic, streets, street traffic, etc. It might be best for you to be on the sidewalk. Or maybe you should instead be on the road since the road is only 25mph and there's pedestrians on the sidewalk. Maybe there's a bike lane, maybe there isn't. Maybe a town has a law saying you HAVE to bike on the road.
Are you allowed to cut through parking lots? Is it a dirt road? Can everyone's bikes handle dirt roads? What if it just rained, cars can still cross a wet dirt road, but I'd rather take a different route if possible on a bike.
That's not including the terrain challenges (which google seems to incorporate). I'd far rather take a route that takes an extra 5 minutes and is basically level vs a route that saves time but requires you to go down and uphill. Heck even wind conditions change can change the "optimal route" in some cases.