Ah...it's because the enlisted folks are getting paid for those meals. Any time you go anywhere on a temporary assignment, you pay for your meals and you get paid.
Officers get an allowance no matter where they are, and they always pay for their meals.
So the problem is...no one thought of it, unless they'd been hospitalized before. No one thinks about the hospital being a temporary duty assignment. But it is, and I cannot even imagine what would happen if the hospitals had to do the fiscal work to have it subtracted out of everyone's pay. They'd mess it up for sure.
Better to do it this way.