I'd assume it is because the officers might be in a position where they choose to send the men (and women, in this enlightened age) to their deaths. There isn't much point eating together if that sort of politics might come into play, the power differential is too large. And it'd be harder for the officers to do that in an emergency if they see themselves as part of the same group.
Not to cast doubt on the officers, I'm sure they care very deeply about the wellbeing of their people and generally do a pretty good job of keeping people alive. But it is the military. People can die. Historically in war, some people die when their officers decide something suicidal is better than inaction.