It's just something I noticed. I figured they would at least have served in the navy, but it doesn't seem to be the case.
Assuming you're taking about the US, it's because the position is a political one, not a military one. This is still true today; the Joint Chiefs are the uniformed leaders of the major military branches, but the secretaries of the Navy, Army and Air Force must by law be civilians and at least five years removed from active service.