We have this in NL. There are some modifiers though: LNG users pay much more, as do diesel users. Electric cars pay nothing even though the vehicles as a rule are much, much heavier than the equivalent cars in their petrol version.
To make up for the lower amount of tax collected on fuel sales, maybe.
Where I live (ireland), taxes on diesel are lower to the extent that it's cheaper than petrol. (done some time in the 80's, I think. To reduce fuel imports)
Since 2006 car tax is entirely based on CO2 output, previously it was engine displacement. Meaning EVs have €0 car tax. (you can tell, because you're required to display the tax-disc in the window and it says how much it cost on it.)
Switzerland has it too, each canton sets its own rules but those I lived & driven in had equation for car tax that would take into account horse power and weight of car. It would cut to 50% if CO2 emissions were below certain threshold. Seems fair.
There is no good rationale as far as I know. And yes, diesels can be crazy efficient. I had a 1.9 Citroen Xantia that on an ordinary sized tank had a 1300 km range.
We have it, but weight is a concern within a class of fuels. This causes a heavy petrol car to be more expensive than a light petrol car but may well cause it to be cheaper than a lightweight diesel based vehicle.