The point of Star Trek is to subvert expectations. Things are never what they first appear to be in Star Trek. Balok was not a fearsome alien intent on destroying the Enterprise. The Gorn was just a fellow starship captain defending his species' territory. So why should the seemingly democratic Federation be simply what it appears to be? Why couldn't it be a devious military dictatorship that manages to function well for centuries? Seems much more plausible, given Starfleet's dominance in the show.
Oh, maybe the 23rd century UFP had some civilian leadership, but by the 24th century there are few civilian leaders depicted, while Starfleet does everything from policing to colonization. I see no evidence of anything but a military dictatorship in the 24th century UFP, with a "civilian" Federation puppet president. Definitely not what we'd expect, and so it's more interesting for the unexpectedness of the revelation!