Passenger rail used to be considerably more important at one time in the United States. Freight railroads were given a lot of powers including that of eminent domain to acquire land and the ability to operate a private police force with the same powers as a government police force. And part of the bargain was that they had an obligation to provide passenger rail service.
Even if it didn't make them money, passenger rail service used to be a prestige operation for the major railroads. They spent a lot of money and wanted passengers. A lot of our grand national park lodges were built by the major railroads as a way to encourage travel on their rails. Union Pacific had their Utah Parks Company that built lodges all over, including Zion National Park, Bryce Canyon National Park, and the Grand Canyon North Rim.
Amtrak wasn't actually expected to survive, but it was a way for participating railroads to get out of their obligation to provide passenger rail service.