This is normal pretty much throughout europe on long distance trains. I know at the very least it's standard in Germany, France, Austria, and Italy. Maybe you're thinking of regional commuter trains that don't have dining cars?
That you're using multiple qualifiers here suggests that these could still be exceptions.
Intercity Express is the high speed long distance train, and are the most common long distance trains by a long shot. They're the ones that have the dining cars. Regular Intercity trains usually don't have dining cars, but they're rather rare. I've still never actually ridden one because they're almost never used (since Intercity Express is so sucessful, and the Regional trains are fast enough for journeys of around 200km)
95% of passengers are not sitting in a dining car watching the world go by in an Amtrak style experience.
Over the last few decades they have generally died out on shorter intercity routes, granted.
Case point - Switzerland, the place of trains - coverage, precision, cleanness, small dense place. I live here. If you take a family of 4 they are roughly 4x more expensive than taking a car, even with their half-card (which for a family of four would be maybe 600 annually). Highways are still chock full of cars and its growing every year steadily. Unless you travel between train stations (or sometimes from city A to city B), but rather from/to rural areas (which are anyway connected via Post buses, having trains everywhere would ruin this country) they are much slower (ie 1h vs 3h to get to/from some mountain hiking spot). God forbid you want to travel further, cross sea or even big lake.
Don't look for salvation of personal transport there, that's a very definition of pipe dream currently.
The positive externalities of rail also make it cost effective to subsidize. Here in Queensland, all public transport now only costs 50c a trip (about 30 eurocents), making travel between our two largest cities (a trip of about 71km) super fast and cheap.
Trains have been around long enough to fill their niches. There's a reason if they haven't.
Some of the headwinds are bad reasons (like status games of showing off your expensive car). However some of the reasons are because trains suck.
There's a train I love to take from my city on holiday, but it's rather inconvenient and costly.
Here in the Netherlands there's actually fewer routes than a 100 years ago (country was full of local 'intertown' trams then). Housing stock has expanded a few times over since the war, but rail routes (light of heavy) stayed put. It's ridiculous to build a 5000 home neighborhood and not plunk down some steel bars! Or at least reserve the space. Meanwhile, bus services are down YoY in frequency, reach. They now basically only serve as a last resort for those that really have no other options and thus can be forced to deal with incredible transit durations.
Even cycling, which in denser cities can absorb some of the commuter traffic, is not encouraged as part of mixed transport. Tax law is such that one modality can be compensated.
The Netherlands has none of the geology to deal with that Switzerland has, so I don't know what excuse there is. All energy went into cycling I suppose. Not bad, but it's about the network, and never about the one modality.
Where I come from, taxes are comparatively low. So it's weird to see people talking about them influencing their behavior so significantly. That's a lot of power the government has... I'd rather keep my money than let bureaucrats spend it to manipulate the public's behavior.
Taxing cars puts the cost of those roads more directly on the users of them.
Whoever is left driving cars (which is, also in the Netherlands, a large fraction), can't for instance drive up to some remote train station, and rail the rest. That's how you can get those who still drive out of their cars; those that already take trains are covered by the rules as they are.
The future is actually some kind of teleportation, which is equally feasible in places like where I live when rail is dead on arrival.
No better way to travel than sitting in a train's comfortable dining car, watching the world flash by and getting where you're going.