Comment by bluGill
Depends on the rail road. Most were as much about what government subsidies they could get (federal, state and cities all did various things as they saw any railroad as key to their success).
A couple railroads started because there was money to be had in transporting things. They picked routes that made a lot more sense (a compromise of geography and the cities served) even today when we don't have to refill the steam engine with water ever few miles. These are the exception though. Most were trying to get the upfront money and not thinking about the long term success.