Several years ago, with a Samsung Galaxy S5, 2 rides on sunny, windy days on tree-lined streets: Sigma wired computer read something like 5.01 and 5.05 miles. The Samsung read 4.5 and 4.9 miles. Strava said maybe 5.02 miles.
The GPS was 2 for 2, and in one case it was wildly wrong. I don't know for a fact that it would have failed again, but it wasn't worth the effort to run the test. Besides, even if it started measuring correctly, how would I know? In any case, it's known that trees with leaves can interfere with GPS signals. Anyone who rides under trees and wants an accurate odometer is more likely to be satisfied with a sensor than with a GPS alone.
And that means: if you want an accurate odometer and can't be sure of where you're riding, you're more likely to be satisfied with a sensor than with a GPS. Of course, you've got to remain aware that there will always be some fuzziness in what the sensor reports, too - it's just likely to be less than what a consumer-level GPS reports.