The longer your segments, the more distortion will be introduced by various map projections (including the projection that you're using to correlate trackpoints with segments) So whoever made a 40km segment for some road is saying that it's a Rhumb line (constant bearing, as drawn in JOSM), rather than (say) the line of shortest distance.