No car has ever measured a road. What it measures is its own wheel.
A sensor on the axle counts how many times the wheel comes round, and the display multiplies that count by one number stored at the factory: the distance the wheel covers in a single full turn. That distance is the way round the tyre, and it depends on nothing but the tyre's radius.
The arithmetic is unglamorous and exact. A tyre with a radius of thirty centimetres carries the car about 188 centimetres forward in one complete turn. Roll it half a turn and the car has moved half of that. Roll it a quarter turn and it has moved a quarter. The distance travelled is the same fraction of the way round as the turn is of a full circle — which is why a wheel is such a convenient ruler.
It is also why the number can drift. As a tyre wears, its radius shrinks by a millimetre or two. A smaller wheel must turn more often to cover the same road, so the counter over-reads: the driver is told he has gone further than he has. Fitting tyres of the wrong size does the same thing, only faster. Under-inflated tyres slightly flatten and shorten the roll as well.
Cyclists meet the honest version of this. A bicycle computer knows nothing until you tell it your wheel size, and if you type in the size of the wheel you used to own, every ride afterwards is wrong by the same percentage — patiently, in the same direction, for as long as you keep the machine.