Actually there isn't much difference in mileage. Let's use an estimate of the Route Napoleon from SJPdP to the highpoint. About 20,000m horizontally and 1,000m vertically. Sum the squares and take the square root. There is only 25m difference, roughly one in a thousand.
The satellites give information that allows
programs to determine elevation and postion after getting information from at least 3 or 4. They do not give position or elevation themselves. While I suppose the programs could factor in elevation in computing distance walked it is much easier to just assume the earth is flat since computing multitudes of hypotenuse won't change the value much. I guess militaries may have the capability to do this but I can't see phone apps having it.
Elevation does get involved in determining walking times which is of more importance to walkers than actual distance. See
Naismith's Rule at Wikipedia. This is also why apps may figure out total elevation gain for you instead of adding up the hypotenuse between points.