driving generates negative externalities like more traffic, smog, co2, damage to roads.
If the tax on gas goes to offsetting these externalities then there is nothing more fair than a gas tax. Because gas use is very correlated with generation of negative externalities.
however im sure california squanders the gas tax revenue on bullshit like infringing on personal freedoms and corrupt government contracts. Not where it actually needs to be spent.