Nothing to do with density. Europe has vast tracts of mountainous areas in which there are only a handful of villages with a few hundred people each and fast trains pass through all these zones.
Fast trains dont run the whole width and breadth of Europe either. There are certain routes on the most populated regions. Moreover, population argument does not make sense especially because the fast trains dont ferry passengers to random stops on the road. They run in between two major cities or population centers where most of the passengers board and disembark from. The same can easily be done in the US in any region.