Transportation infrastructure is actually in the Constitution (maintain postal roads) so it makes sense in the broad sense. In the specific sense we should only be funding transportation that actually gets used, the government is supposed to work for us after all. So spending a bunch of money on trains nobody will ride is dumb, while spending money on the highways that have replaced them makes sense.
No one used the federal highways before they were funded. Something that does not exist cannot be used. If we spent federal money to build passenger rail infrastructure, it would be used.
spending a bunch of money on trains nobody will ride is dumb
People would ride such trains.