First, troops aren’t being cut to two meals. They are being cut to two cooked meals and one meal of combat rations (MREs).
Second, cooking in Afghanistan is terribly expensive. If you hire Afghanis to do it for you, it is hard to be sure they won’t poison the food. If you hire contractors from a trustworthy country, they want a lot of money to be in a war zone. If you use troops, they are doing it instead of doing their real job. Cooking in prison, OTOH, is very cheap. You can buy food that is almost at the expiration date (because you have a good idea of how much you’ll need) at a discount and use practically free labor from prisoners. So being able to afford to provide hot food in prison doesn’t mean we can provide it in a combat zone.