From "Errand of Mercy":
KOR: Hardly. They were quite important to us, but they can be replaced. You of the Federation, you are much like us.
KIRK: We're nothing like you. We're a democratic body.
http://www.chakoteya.net/StarTrek/27.htm
What does that actually mean, though? The Federation's representatives don't appear to be selected by a popular election. They called a vote to decide the issue of Coridan which came down to a vote between representatives from each government... but the representatives are AMBASSADORS, not senators or legislators. And then there's T'Pau, who was apparently offered a seat on the Federation Council and turned it down for some reason, which tells us that Councilors do not run or campaign for office but are SELECTED for that position by their home governments. So at least in the 23rd century the Federation operates more like the United Nations than, say, the UK or the US. It's a
democratic body in that its representatives decide things by voting on them, but that doesn't mean the Federation as a whole is a democracy. Hell, we don't even know that all of its members practice Democracy; Tellar probably does, but Andor and Vulcan almost certainly do not (the Deltans probably choose their leaders based on whichever contender is still conscious after the semi-annual planet-wide orgy).
Because they're members of the Federation, and are bound by its charter. The principles enshrined there (as mentioned throughout Trek history, especially in TNG episodes like "The Hunted" and "Attached") specify that a member world must have a stable planetary government that abides by the rule of law, equal justice, and individual rights.
Sure, but as TOS shows us there is ALOT of wiggle room in how those rules are applied. Vulcan, for example, is allowed to settle domestic disputes through ritual combat, as probably is Andor. There's also the oppressive society of Stratos apparently didn't run afoul of Federation laws even though they kept the Troglytes in a state of what was essentially slavery. And Kirk didn't even impose a LEGAL solution on Stratos, he just figured out why the Troglytes seemed so incapable of changing their own fates and gave them equipment that would let them tip the economic balance on their planet. Here, actually, is an important lesson: at least in the 23rd century, the Federation
does not reject the legitimacy of caste systems, nor do they have any legal reason to disrupt such systems if one of their members adopts one.
Obviously, something changed by the 24th century. Probably a stronger central Federation government, or maybe a drastic change to the Federation charter that eroded some of the rights of autonomy its members had previously enjoyed. That might actually have been a consequence of some of Starfleet's secrets being declassified; people found out about some of Starfleet's whackier adventures and realized the universe was stranger and scarier and more dangerous than they ever dreamed, suddenly the idea of a stronger collective government seemed a lot more attractive.
And seriously, one of the central themes of Trek is that the Federation represents an idealized utopian future.
No. EARTH represents an idealized utopian future. The Federation, not so much.
But it's important that this is a decision for civilian Federation authorities to make, according to consistent legal principles, not for Starfleet to make on an ad hoc basis. I was responding to the particular post that suggested that new information, especially military information, ought to be automatically classified as a default state. That's a whole different kind of approach.
Starfleet is not, strictly speaking, a military organization, so their choosing to classify information by default would have different implications. More likely, all of their information is restricted only to people/scientists/institutions with a certain level of credentials -- say, academics and researchers from reputable universities and facilities -- while more sensitive information would require more extensive vetting and security clearances to make sure that it's not being given out to people who might misuse that information. Consider that most of the information Starfleet classifies this way would be non-military in nature; information about the space amoeba, for example, or the exact radio frequency that causes a crystalline entity to explode. While the existence of the Bajoran Wormhole would be public knowledge, only authorized personnel would have access to Sisko's sensor logs that would reveal how the wormhole was constructed and the nature and dimensions of its singularity. A summary of those logs -- without the originals, probably -- would be accessible to educators and journalists (Keiko, for example) while the basic sensor logs would be available to physicists in universities all across the Federation and to anyone in Starfleet who wants them. The complete log for the runabout including its diagnostics data, flight recorder data, and the internal sensor logs for Sisko and Dax's vital signs during the crossing might require additional clearances such that you would have to be either a VERY well-vetted scientist/consultant or a ranking officer in Starfleet.
Either way, to say something in Starfleet is "classified" is probably a bit like saying that something at CERN is restricted information. They definitely won't let just anyone have that information, but that doesn't mean that restricted information is a military secret.