Consider that running the food service in the diner on a train is the equivalent of running the food service in a regular restaurant through a continuous earthquake of between magnitude 3 and magnitude 6 with occasional jolts to magnitude 8. That's probably a rough equivalent. Next, your water supply is very limited because you carry it with you, and the electrical power supply can be tenuous. You are also more limited in space for food prep than in many if not most restaurants, and your seating area is small by most restaurant standards. Next, the restaurant staff has to live on premises at the restaurant, during the continuing earthquake conditions, and they frequently have to work much longer hours than a "40 hour week". If you are requiring your restaurant staff to be basically on duty plus on call for 48-72 hours at a time (or more, depending on the sort of turnaround you may be requiring them to make to the next train going the other direction), you're not going to be allowed to pay minimum wage, and anybody that WOULD work for that would not be able to do the job. They also have to be trained in the mechanics of this very unusual combination transportation device and food service device called a diner-on-a-train, i.e., what happens in an emergency situation, where the staff also are the "first responders" in case of a serious accident. Finally, you can't call the food supply company and arrange a delivery on an hour's notice, because the restaurant has no fixed address. And, beyond the issue of food service and staff entirely, you also have to pay for the upkeep for all the moving parts, and for the fuel to move the diner, and for maintenance and repair on the engine that uses that fuel to move the diner. If all you had to worry about was selling and serving food, it could indeed be a whole lot cheaper.
What really gets me is that we keep having this same argument. YOU CAN'T SAY "This is just a restaurant, why is it so expensive, why can't it make money?" BECAUSE IT IS NOT "JUST A RESTAURANT". Maybe we should just ask KFC or Wendy's or McD's to build some specialized drive-through, with a really, really long pickup window every couple of hundred miles, and make coach windows that you could open.
Meals for astronauts on the orbiting space station probably cost many hundreds of thousands of dollars (if not millions) for each meal, if you consider all the costs from the original farm where the raw materials were grown/produced, to research to develop the foods, then research to develop packaging, manufacturing costs, testing for stability and shelf life, testing for safety, testing and modification for aesthetics and taste, testing for nutrition, testing and quality control costs, transportation and delivery costs (a biggie), to finally you are consuming the food on the space station. But at the point where they are actually eating it, "it's just a restaurant, why is it so expensive?".