As a child I went to Steigers in Holyoke & Springfield with my mother, I don't remember which department store had the escalators that I enjoyed and would ride endlessly, after many trips up and down I would get dirty looks from the sales people.
It's not that the railroads were on the lookout for communities to run their tracks through, it's that the tracks were there before the communities were even built...
In Brooklyn, our Good Humor man would give us pieces of dry ice so we could make screeching noises touching the metal poles...imagine something like that today,lol!
Must have been a bummer for kids back then trying to play road hockey with those two rails running down the middle of the street.