Originally, when the colonies were established, people settled near the Atlantic coast. This is because it was the closest point to Europe, and the place to which ships arrived. However, as the population of the nation expanded, cities began to grow away from the Atlantic Coast.
In 1840, this was the pattern that cities in America were following, due to several reasons. First, by this point in time, the land close to the Atlantic coast was heavily populated, which led to high prices and lack of availability of land. People with less resources had to look further for afforable land. Second, cities were being built near sources of trasportation, in order to facilitate trade. These included railroads and rivers, and were not necessarily close to the Atlantic Coast. Finally, during this time period, the West began to be explored more carefully, which led to the establishment of cities in this region.