This post is an improvement feature. In case it is implemented already, i ask you to say it.
The image on division “GraphHopper Routing Engine” on URL  suggests the topology profile along some route. I am unaware of distance calculation methods used along the API methods.
In my own research for distance calculation, I learn about concepts like metric and curve length. In our case, there is this parametrization variable called length “ell” (I suppose given by the spherical distance along an spherical surface) and the height involved along the curve, namely h(ell). For a route curve as a line, the total distance is given by sqrt(h^2 + L^2), for value L equal to total horizontal length and height h the vertical length. Since, in my example, we deal with an spherical parametrization, we require the integral calculation \int_0^L sqrt(1+(dh/d ell)^2) d ell. I made an ilustration, below:
This article  provides a much better explanation than mine.
All in all, the improvement refers to, according to my assumption of spherical distance, tweak the distance with available topology information.
 Open Source - GraphHopper Directions API
 Finding the length of curve using MATLAB – The Numerical Methods Guy