Status of military personnel as it relates to COVID-19 or any other situation that can affect a significant percentage of available crewmen is classified for operational concerns.
That does not mean the information is inaccessible to anyone with proper clearance, a need to know, etc.
For example, for all you/we know, the CDC is getting these figures directly from the Pentagon, perhaps with the specific names and duty assignment locations/ships redacted. They may only be reporting aggregate totals, not case-by-case info.
The state can extrapolate that total from the known cases versus CDC-report numbers.
Just because YOU can't see the numbers doesn't mean the people who NEED to see aren't able to. What, exactly, would you even do with those numbers? Come up with another Anti-American, anti-Military tirade with a pinch of COVID-19 conspiracy for flavoring?