Railroads grew somewhat slowly in the decades before the Civil War. There was a great deal of enthusiasm for railroads, and companies sprang up all over the place, funded by private investors. However, the technology (mainly for making iron and steel quickly and cheaply) was not yet in place to allow railroads to boom as quickly as they did after the war. That is why US railroads grew from 3,000 miles of track to 30,000 miles between 1840 and 1860 but then exploded to 192,000 miles of track by 1900.
Railroads grew, then, because there was a great deal of demand for transportation. However, technology limited their spread in the time before the Civil War.