Starfleet is founded as part of the Articles of Federation as the group that will jointly explore and protect. The viewpoint of Starfleet can vary greatly from writer to writer from a Gnostic self aware organization of peace to a an analog of the US military.
It is frequently populated by wrong headed command staff for Our Heroes to correct. Indeed the misguided Admiral is a Star Trek trope.
Big Starfleet, Big Federation Edit
Big Starfleet, Small Federation Edit
Reasoning: This viewpoint is the result of gaming. The thought is to keep the Federation within the bounds of reasonable travel time for the speeds given on the warp speed chart, no cheats like Cochran factors. It requires math. Yes Roddenberry grabbed star names out of his ass with no real concept of where they were actually located, realize that, move on. We will not rationalize it.
The Size of Space is considered and the fleet made large enough to reasonably patrol the unthinkably huge Federation we have now that we stunk it to a reasonable size for the speeds of the ships.
Small Starfleet, Big Federation Edit
Small Starfleet, Small Federation Edit