The difference is that cars react worse to high demand than trains do. The capacity limit of a train is usually based on how often the train runs. It's usually possible to increase capacity by running more frequently, which actually improves the quality of service by making people wait less*. Very few rail systems- basically only the very busiest urban subways- have ever gotten to the point of maximizing the capacity of the rails, and the capacity of those systems dwarfs any roadway you can build for comparable cost.
In contrast, roads behave very badly when you try to crowd too many cars onto them. They actually reach their maximum capacity in people transported per unit time at some point below their maximum physical capacity for cars. When you try to shove too many cars on them, they slow down and you wind up with a traffic jam. Rail doesn't have an equivalent because it's centrally managed, and the operator never puts too many cars on the tracks. We could try harder to keep roads at or below their maximum capacity, but drivers complain incessantly anytime you try to impose congestion pricing.
*There's a quality breakpoint on any kind of shared transportation system (trains, buses, etc.) where the wait time is short compared to the ride time, so people feel like they don't need to consult a timetable anymore. They can just show up and wait for the next ride without having to plan in detail.