It's only for EVs because regular ICE vehicles already pay taxes on the fuel, whereas electricity is not taxed.
Electricity has too many other uses to make a tax on it practical, whereas gasoline and diesel are generally only used for transportation with very occasional lawnmower/generator use.
Taxing out of state vehicles is difficult, but if the other states have a similar system then it would balance out as those vehicles would still be paying the tax in their home state even for miles driven in another state, and vehicles would be going in both directions unless the tax rates are radically different.
The fuel tax system also addressed this quite conveniently as your driving in another state would be limited by the capacity of your fuel tank to make it there and back before you'd have to fill up in the state you were driving in and thus pay their local taxes.