If you have a project that provides a public good that benefits everyone, it makes sense to pay for it by having the government tax everyone. If you have a project that only benefits a single person (a private good) or a group (a club good), then it can be paid for directly by the beneficiaries.
Transportation is a challenge, because it's a common-pool resource, that benefits everyone but can be hogged by a subgroup. You could fund it from general taxes or conscription, as sidewalks are funded here in New York. But some who don't walk much object to funding sidewalks; for example, in North Carolina property owners are not required to provide or maintain them, so in many places they are nonexistent. The problem is even clearer if we imagine making all air travel free of charge: we would get people flying from New Jersey to Tahiti every week and using up all the oil.
If you fund transportation as a private good, where the user pays every aspect of transportation including energy, operations, capital construction, capital maintenance and security, then only the very rich will be able to afford it all. The closest example we have to this is in the Dark Ages, when the only people who could safely travel long distances were knights and those under their protection.
If you fund transportation as a club good, then you necessarily exclude the poor from enjoying its benefits, and the members of the club also pay for the economic benefits that are shared by everyone.
Obviously, the solution is some kind of hybrid funding system. You could have transportation security funded out of general taxes, but the construction of highways paid for by vehicle registration fees (club-type funding), and the purchase of vehicles and compensation of operators funded by individuals. The part that's funded out of general taxes is often controlled by the government, but the parts funded by club taxes or individual resources can either be collected by the government and used to benefit the club or individual. Alternatively, it can be left up to independent organizations to collect the club and individual fees and spend them on transportation.
One problem is that it's really hard to get the mix right. Should the users pay a single fee, or a fee per unit consumed? If it's a single fee, that does nothing to encourage conservation. If it's a fee per unit, that doesn't take into account the fact that a dollar means a lot less to a rich person than it does to a poor person. This is the classic "regressive" argument against the gas tax or a per-mile tax: why should the government charge a poor person a much larger percentage of their income per unit of energy or road consumed? And why charge a percentage of what someone paid for gas, rather than a fee per unit?
If you ever do get the mix right, it's not likely to stay right. As cars are becoming more fuel-efficient, people can travel more per gallon of gas, which means that they put more wear and tear on the road than they're paying for. The cost of asphalt, steel and labor have all varied significantly over the years, not to mention fuel.
Sometimes governments allocate funding sources, seemingly at random. Why do lottery proceeds typically fund education? It's not to teach children enough about probability that they don't buy lottery tickets when they grow up. Apparently it was just because education needed money, and the people who wanted a lottery used the lure of lottery money to get education proponents on their side.
Transit funding is full of these things. The New York MTA is funded by a gazillion little taxes, very few of which have anything to do with transit. Fares and general fund subsidies are easy to understand, but then there are things like the mortgage recording tax. Why does the mortgage recording tax fund transit? Because someone saw the revenue stream from mortgages and the need from train riders and decided to match them up. A kludge, in other words.
As I wrote last week, these kinds of kludges are prone to causing resentment among those who rarely use the service that's being funded. Consensus can only be established if people understand what's going on, and all these funding mismatches arouse suspicion and preempt consensus.