Taxes are not just to fund government, but to fund society, which is a bit broader in concept.
When everyone drives cars throwing out pollution that pollution goes into the air, a COMMON, which is not owned by a single person, and no single person has responsibility to clean this damage or prevent it.
Thus a tax on petrol as it pertains to the amount of pollution should have the money directed to fixing these issues, with clean energy investments, cleaner car techs, maybe even tax CUTS for cars that use less or don't use petrol.
Taxes are not just to fund government, but to shuffle money around in ways that benefit society as a whole, the government just decides where this needs to happen.
In the case of petrol where a common is damaged, this is vital.
Drugs are a different case, where the damage is typically personal, so 'vice taxes' on drugs and such should be based on societal burden alone.
How much does health treatment for smokers cost the state per year? How many sales of tobacco are there? Pick a tax rate that will cover the societal cost for the expected consumption rate.
Many of these things should be zero-sum games, taxes on tobacco to offset the costs of tobacco, taxes on petrol to offset the costs of petrol. This was all people have free choice to do as they will, and each person only pays for the vices they personally indulge in.
Funding the government is (and should only be) done through income and/or (general) sales taxes.