Well Indian Railways is much more the government than Amtrak is. There is an entire Ministry of Railways that runs the railways in India.
The Railway Board which is the executive body that runs the railways answers only to the Ministry of Railways and is funded entirely by the Ministry, although actually Indian Railways generally is cash positive once you remove all the political pet projects also known as "strategic projects" into their own account.
Barring a few exceptions, the railways pays in a handsome dividend into the general exchequer, and there is usually panic in the bad years when it falls short.
So it is but natural that Railways self-insures itself including for payment of basic compensation in case of accident and injury, though the amount is not large, but it is quite a bit of money for most users of the railways. Nobody in the US would qualify as a bottom half of the users of Indian Railways given their income levels if they happen to be collecting any kind of safety net payments from the government or making minimum wages.