The population density gives a good idea of how many trips there will be in an area, but it doesn't tell you anything about how easy it would be to serve those trips.
If the population is evenly spread at that density, it would take an enormous amount of service to provide a decent frequency for all trips:
View attachment 489915
This is like the suburbs of most North American cities.
If the population is concentrated into a variety of relatively dense centres, then it takes a lot less service to serve all the trips at a reasonable frequency.
View attachment 489914
This is like the Netherlands.
But the best case scenario is if your population is arranged along particular corridors, because you can achieve very high coverage with only a handful of services.
View attachment 489913
This is like Japan or Hong Kong. Or Southern Ontario.
Nearly all of our major cities are aligned in a handful of corridors. If you play connect-the-dots with them, you pretty much get our existing passenger rail network:
View attachment 489918
(There are a couple missing links like Kitchener-Brantford and Guelph-Hamilton but the rail coverage is still pretty good). Those missing links can be covered by bus service.
In the Netherlands, population centres are scattered all over the place, so it takes a huge number of lines and services to make the rail network frequent, fast and direct.
View attachment 489917
In Southern Ontario running Dutch levels of service would only cost us only a tiny fraction of the cost of achieving those frequencies in the Netherlands, simply because there are so many fewer services to run.
The lower density of Southern Ontario is in large part due to the vast areas of farmland between population centres once you get west of Kitchener. But those areas don't make rail any less competitive. In fact, they can make rail more competitive, since intercity trains themselves have an average speed higher than cars. The longer the distance the more the speed advantage offsets the time passengers spent getting to the station and waiting for the train.