Let me start by saying that I don't believe Dining cars should be removed from trains that have them. Having said that, let me describe what happened in real life as ridership increased by leaps and bounds on overnight premier LD trains which originally had Dining Cars (or Restaurant Cars as they were called) in another system. Indian Railways went through all the gyrations and combination over the last 50 years.
In the 60's the premier overnight trains were the so called Air-Conditioned Express trains. They had Dining Cars and they were relatively short trains essentially 8 to 10 cars. In the last incarnation they even tried married pair Kitchen and Dining Car sets. But even those were pretty much overwhelmed as the trains grew to 12 cars, 5 or 6 AC Chair Cars (coaches) and 2 or 3 AC Sleepers.
In 69 the first Rajdhani Express was introduced and it was introduced with a Pantry/Buffet car, not a Dining Car, and food was served at your seat for the four snacks/meals - Evening Tea, Dinner, Morning Tea and Breakfast. The original 10 car train had a single Pantry Car, and the food served was really good, but lesser variety than in the Dining Car. But because more people could actually get the food this was very popular, and it was imperative that everyone who wants food gets it because these trains had very very few commercial stops where one could get food from the station. So either you get food on train or starve was the situation.
As the Pantry Car experiment on Rajdhani was considered a success, the trains that had Dining Cars all lost them within a year or two and had Pantry Cars and food served at seat/berth substituted. That was pretty much the end of Dining Car service in India, except one outlier in the Deccan Queen between Mumbai and Pune, and an occasional other short distance train.
Since then, specially post 92 economic liberalization, traffic has grown by leaps and bounds and trains have grown to 18, 20 even 24 cars. The Rajdhanis are upto 18 cars, all Sleeper trains now, and the longest ones carry two Pantry Cars. So an 18 car train typically has 14 revenue cars 2 Luggage/Guard/Generator cars and 2 Pantry Cars.
Some food - the main course and a few side orders, for AC First Sleepers are cooked on board, but for all others freshly cooked pre-packaged meals are boarded from on shore kitchens and stored in massive hot storage racks in the Pantry Cars at high enough temps so as not to spoil, and are served at everyone's seat by an army of servers. Cheap labor can do wonders in terms of service sometimes
So oddly enough the very success of overnight trains has led to the more or less permanent demise of Dining Cars, simply because it became impossible to serve ~900 their meals with any guarantee using the Dining Car method.
In the last 5 years they have introduced overnight trains that are point to point non-stop trains, i.e. no commercial stop other than the origin and destination, e.g. Delhi to Kolkata 1441 km overnight in 16 hours, no commercial stops on the way. They are branded as Duronto Express (Duronto implying fast) and have uniquely liveried consists. This has made guaranteed delivery of food an even greater imperative, and even these trains are always filled to the gills with long waiting lists on most runs.