I agree that there are other organisations that conduct themselves in a military type fashion like the coastguard and probably the 23rd Chapter of the StarTrek fanclub, Las Vegas division, the police, even the TrekBBS gives its members honorary ranks.
However the difference between 'pretend' military organisations and real ones is that real ones have great big guns to back them up. If the Coast Guard or the 23rd Chapter used or had access to heavy or nuclear weapons then not only would I consider them military but would hope they would have a strict military structure under the control of the government.
I thought they saluted in STID, maybe I'll just have to see it again. LOL.
I know they didn't salute in TOS but Kirk dressed his people down just like they were in the military.
I've had a tiny bit of experience working with the military in a civilian capacity. When in an office type situation everyone called each other by their first names not by rank - sort of like in Star Trek. That may not be the case universally though.
And that scene in TUC where the waiter guy is setting the table, I've seen that take place in an officers mess a couple of times.
There's military and military though. I don't think Spock or Troi or Janeway or Crusher for example would join an organisation whose sole purpose was to battle Klingons or Romulans. I believe Starfleet was like someone has mentioned before, like the time of Captain Cooks voyage. He had scientists and map makers aboard.
In TOS they spent some of the time exploring, some of their time mapping the galaxy, some time supporting colonies and transferring grain/medical supplies, sometimes making first contacts and sometime making military patrols.
They even had an episode where they played wargames.