"U.S. Code of law explicitly limits the total number of vice admirals that may be on active duty at any given time. The total number of active-duty flag officers is capped at 160 for the navy.[1" So using the above as an example for just Vice Admirals, this is about 0.0005% of the US population of 320 million (estimate). Now the Federation has a population in the trillions, 9.85 trillion by the 24th century (Memory Beta). So for just one section of flag officers, 0.0005% of 9.85 trillion is 4.925 billion! So how big does Starfleet have to be, to be the effective exploratory and militant arm of the Federation? They need their own damn planet for head quarters, San Francisco would be way to small!