Are you sure about that? My understanding is that the california gas tax is based on dollars not gallons.
You could be right about CA, but I doubt it.
It's been "per gallon" historically so it was easy for people to calculate and/or set gas pumps/signs as wholesale prices change.
(Used to own a bunch of 7-Elevens. You don't get the best-and-brightest sometimes.)