The price difference is because the vast majority of costs for car transport (direct, like road maintenance and indirect, like millions of people dying because of pollution) are handled by the state. Trains can easily be much cheaper as most costs are fixed and they can handle orders of magnitude more traffic without congestion.