The story
The United States Environmental Protection Agency requires all new vehicles to undergo a set of standard emissions tests which simulate city and highway driving. Part of the test measures estimated city and highway gas (petrol) mileage estimates. Since no test can exactly simulate all driving habits and conditions, the actual gas mileage of each vehicle will vary. As a result, when these estimated mileage claims from automobile manufacturers appear in advertisements, they are almost always accompanied with the standard disclaimer “your mileage may vary”.
Etymology from Wiktionary, CC BY-SA 4.0.