Ghost towns in the 1800’s / 19th century were mainly the cause of citizens abandoning a town to work elsewhere.
The railroads brought in jobs; someone had to build them, of course. This was vital to America, as a growing new country. Settlers, immigrants, slaves and workers from Europe, Asia and Mexico came to the new land searching for work and freedom. Once these jobs the railroads had brought in were completed, there was little to no work. And without work, people wouldn’t have shelter, food, money, clothes, ETC ETC. Eventually, the search for work led to people abandoning certain towns, to find better prospects.
The government, at this time, was offering land to farmers for incredibly low prices. In exchange of the farmers using this land to grow and cultivate their crops, the farmers would receive many acres of new land. If this wasn’t suitable, they could farm for 6 months, then buy the land they were using for about 1.25$ per acre. This led some farmers away from their home towns.
Another reason ghost towns may become ghost towns, is because of economic growth. Elaborated further: Rapid economic growth can lead to either a boom town, or a ghost town. Railroads proved to be an extreme leap for America’s currently small economy. Much business moved out of small, simple, and poor towns, and relocated itself in larger cities for bigger profit. Because of this, many small towns were simply abandoned, in pursuit of growth. Railroads running through towns was the main method of transport, for those who wished to leave.
I really hope this helps!! I might have gone a little off-topic, whoops.