Dunno how it works in UK, but in US, there are local roads, state roads, and federal roads. There are also local, state, and federal gas taxes that vary by jurisdiction. The funds from these gas taxes are used to finance new highway and roadway construction and maintenance of existing roads. Sometimes, a special tax is levied at the local level for specific local roadway projects. But the big infrastructure projects are almost entirely paid for by gas taxes.
Either way, the point of the tax has never been to "punish pollution".