The way it was explained to me, years ago, was it was to keep the military in charge of a civilian to avoid a dictatorship. Say for instance, if General Patton, was very popular to the people due to staggering military victories, but had views as an independant opposing the Congress, then there was a safeguard to keep friction of having a popular president to the voters, who locked up everything in legislation, because he was not part of the two party system. It made sense to me when the professor explained it, but who knows.