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.
Quoting from the Emancipation Proclamation itself: ” all persons held as slaves within any State or designated part of a State, the people whereof shall then be in rebellion against the United States, shall be then, thenceforward, and forever free … And upon this act, sincerely believed to be an act of justice, warranted by the Constitution, upon military necessity, I invoke the considerate judgment of mankind, and the gracious favor of Almighty God.” (my emphasis)
In other words, Lincoln’s executive action applied only to areas under martial law. It did not free the slaves in the border states that were loyal to the union (they do not appear in the list of states and parts thereof that are in a state of rebellion). Because military necessity requires quick decisions, presidents have a lot more authority when it comes to war than in times and areas of peace.