Well, for one thing, Earth Starfleet isn't military, but the Federation Starfleet is. That alone should tell you something. I agree that when the Federation was formed, its Starfleet must have taken cues from the Earth version as to how to organize things. But logically speaking, they can't actually be the same organization. Totally different areas of jurisdiction and responsibility, let alone mission profiles.