Subway tried that in the cafe cars between ALB and NYP (where there is no cafe service on Empire Service trains that only operate between those two) a few years ago. They no longer do so.
But that ride is only a few hours and doesn't need full meal service, and Subway doesn't offer table service. I'm just wondering if a chain restaurant with proper table service could possibly take over a dining car and run a tighter and more efficient ship than Amtrak themselves. This is all hypothetical and I have no idea what realistically would or wouldn't work and why, but it's just a thought.
The problem is staffing costs. A stationary restaurant can pay wait staff minimum wage (or even less than minimum wage and expect tips to pick up the rest) and fill the position. They can also fill it with part-time help that they don't have to pay benefits for. The nature of Amtrak's dining service doesn't allow for that kind of flexibility. Especially with delays, there aren't many places to turn staff and have them back home at the end of the day, so you're going to have to pay for people who are willing to work overnight. That drives up wages. That also means that you can't rely on part-time help, so a benefits package also has to be paid for. This is good for the workers, but it does drive up the cost, and so even with the efficiencies of scale there likely wouldn't be massive savings by outsourcing it.
(There'd probably be a bit, simply because Amtrak wouldn't need to do its own management of the diners, develop its own menus, etc., and could work with the bulk discounts a larger company may get, but I doubt it'd be enough to make the diners break-even or save the amount that the boxed meals save.)