Here in the UK the train to London is five hours and £75. The coach is £15 and eight hours. Four people in a car perhaps £10 a head. Trains are nicer but there is something annoyingly mysterious about the ecomomcs of it all.
You are severely underestimating the cost of the car ride. Fuel is not the only cost, but even this feels low. Five hours by train has to be at least 500km which will be depending on the car on average I guess 35 liters of gas, which at today's prices is more like 60 pounds.
But a car costs a couple pounds every day for registration, insurance, regular maintenance, new parts (tires etc). If you go to London and spend 10 days there, this is easily 50-100 pounds even if it's just parked and doing nothing. Now also add possible parking costs and emergency costs for maintenance if the car breaks down -- a friend of mine went with his car to the seaside with kids a couple years ago, and the car broke down midway. It cost him 2.5k for his local shop to pick it up and repair. The shop on the spot even gave him a 4k quote.
And of course you have the upfront investment for the actual car which is a few thousand for a used car or at least 15 thousand for a new car these days.
Yes I absolutely over simplified to make a quick point. But most people already either have the car with its costs and breakdown coverage or they don't. For what its worth I have made the 250 mile journey in a car on about 25 litres of petrol which is about £40 these days I think. Though sure you could alter a thousand factors to change the results.
Accepting or not that you pay for these costs anyway, they exist. And the more you use your car the sooner you will need to replace it. And certain other costs exist for trains also, not just the price of electricity. A more realistic comparison would be car rental vs train since in both cases you pay for temporary use.
It’s a question of economy of scale. The amount of road vehicle that has been built over the last 150 years vastly supersedes the amount of train over an even longer period. More train, means better train. Hopefully advances in computer aided design will allow some narrowing of that gap.
EDIT: There is also an inherent feature in trains that greatly reduces the rate of progress. With toad vehicles there is very good decoupling between the track and the vehicle, from a design pov. With trains the chassis design is more coupled to the track design. And since you can’t really upgrade track easily, on both train and road, there are more constraints in new train design.