There is a great movie, "Charge", on the racing of electric bikes in the TT, from the first to the most recent. Really well done with amazing characters.
buffalo they work it out to try and run out of juice at just about 1 lap plus 1 foot In all seriousness they want to be out of power when they finish, very much like the perfect fuel load in gas powered racing has you run out of gas on the checkered flag. Anything left at the flag is energy that could have been used to go faster. It's one of the most amazing things the engineers do, getting it just right.