It is a legal issue, originally. The US did have a giant electrified trolly system built around the coal and diesel-electric train system. This was a primary method to sell electricity before the Great Depression. When Congress decided to do mass electrification they guaranteed generation and sales monopolies but required firms to sell off all non-generation related businesses. The primary buyers of the trolly systems were the automotive makers, who immediately shut them down.
While there was some electrification early in the 20th century, mostly in response to legal issues with smoke generation, the change in technologies eliminated this need.
Also, by the time the US finally electrified its grid, it has a well established diesel-electric train network. There is an economic issue, however.
The US hasn't had its housing or industrial base destroyed since the Civil War and there, only in the south. Rail lines were set to be optimal for the construction and land use of the 19th century, well before electrification or mass transit. Europe, on the other hand, has suffered multiple catastrophic eliminations of its physical plant. This has allowed for the laying of rail in ways not possible in the US without mass condemnation of land, hence the US lacks any type of bullet train. The same is true for electrification of trains. It would require a massive reverse engineering of the existing system. Rail, in the US, often travels places that people do not live.
The Hi-Line is a good example of a train route that has very few people on the entire route. Trains can travel at relatively high speeds because there are no people in the middle to slow it down to allow for automotive traffic. Because there are no people, there is also no power system to support it, except incidentally where it hits settled areas.
It would be possible to create a long electrical system for this one customer, but why?
Another likely issue is that there are multiple competing railroads that use each others' tracks. They rent them. If one electrified, but the others did not, then no one would be able to use the electrified tracks without serious modification. Even if all electrified, they would have to do so to the same standards. There are several small roads too in the US. Look at http://www.wlerwy.com/
The persisting existence of small lines implies that the economies of scale are such that they can thrive. Electrification requires a large capital investment compared to a diesel-electric train. There would have to be some national impetus to move these small companies down that path when they do not have to take the risk that they will not recover their investments down the road.