Oh the old debate. Let me get my thoughts together.
Starfleet is a military organisation.
Wow. That was simple.
Anyway, someone mentioned the MACOs being on Enterprise as being the military. I think the United Earth Starfleet was never meant to be a combat unit. Hence why Enterprise didn't have a policy of elevated alert status in battle, which came later with the introduction of "Tactical Alert". Instead they were given the means to defend themselves. When the unthinkable happened and Earth entered into an interstellar conflict, the UE Starfleet had no choice but to adopt the mission of Earths defensive space force, and brought along the separate special forces of Earths unified army (although I still believe that the MACO were not a large fighting force. We know that the Earth nations still had militaries, so the MACOs were an elite fighting unit granted to the United Earth government. A small force it always had access too.)
Starfleet is an adaptable organisation. And it seems like it builds up to a full combat force when needed. Star Trek VI is a prime example of this. Starfleet built up into a large military force to counter the Klingons. This large force was scaled down after the movie, evolving into the more exploratory Starfleet of Picard's era. It of course built up for the war with the Dominion. Even adopting more military style I uniforms.
Starfleet is what is needed for the Federation. Eliminate the bureaucracy by having one group do it all.