In the run up to the Penn Central bankruptcy, US railroads spent decades fighting regulators and trying to stave off financial ruin. The government’s longstanding preferential treatment towards trucks for freight and air for passengers bled the railroads dry. They couldn't earn enough to reinvest. Infrastructure decayed. Service followed.
Much like many other conglomerates during the middle of the 20th century, railroads wandered into alternative businesses: Natural resources like mines and timber, commercial real estate, and oil pipelines - anything to help drive returns and attract capital to survive just one more day.