This is about as simple as it gets, in this debate. When you drop everything to fight wars, you are the military.
At that moment in time, yes. When you are fighting wars, you are performing the duties of a traditional Military.
I would gladly concede on the "Starfleet is the military" issue, if someone can point to me who the Federation's military is and why it always needs the support of Starfleet, to the point that we never see this military.
But you are correct, in a way. "StarFleet is the Military" when the UFP calls upon it to enforce it's will or to fight.
But when they are not doing those types of actions, they are not in the "Military Mind Set" at that moment in time, they are free to perform their duties as needed.
Exploration, Scientific R&D, Anthropology, XenoBiology, etc.
It's a bit more complicated than "We are the Space Military" all the time.
There's a Mixture of Academia & Research Institute into StarFleet, along with Exploratory Duties, and a whole host of other responsibilities.
It's not so simple as to what a traditional "
Military Operations other than War" do.
e.g. StarFleet has "
Duck Blinds" where they keep their StarFleet Anthropology teams in to observe the locals and do anthroplogical research on the natives of whatever target planet they're investigating and the people that are on said planet.
While there are
Civilians who are telling the army that they need Anthropologists. Despite the fact that the Anthropologists are not happy to help the US military during it's occupation in Afghanistan.
I'm sure many, many soldiers would rather be doing other things. Doesn't change the reality of what they are.
But in StarFleet, it kind of does to a degree.
That's why I don't call them a traditional military service and more of a Hybrid service.
Aspects of Academia, Research Institutes, and all sorts of other entities & services are all integrated into StarFleet.
Aspects that modern Military aren't willing to do or tasked to do.