Let's just entertain for a moment the "not a military" argument just for shits and giggles. That means that when the Federation was founded in the wake of the Romulan War, the four founding members chose to disband their own militaries and retask a space exploration service to hold the monopoly on their defense. Despite having just ended a war against a militant enemy that was only resolved with a shaky and uneasy truce. And despite having run-ins with at least one other species of militant conquerors and an alliance of five races within the same species that actually made an attempt to destroy one of the Federation's founding worlds not to mention various skirmishes with various other aliens with militaries that hold their own, the newly formed Federation decides to do away with their own militaries and that defense will be handled by an exploration service that apparently prioritizes scientific endeavors as its primary mission. And the damnedest thing is, this somehow works, and over the course of the next nine hundred years, despite run-ins with all kinds of hostile galactic powers, including a cybernetic race bent on absorbing other cultures and worlds into its own collective hivemind (who have themselves attacked Earth on at least two occasions and decimated Starfleet both times) and a genocidal alliance of conquerors who waged war against the Federation which included decimating Starfleet, conquering a core world, and even scoring a direct attack on Earth itself, Starfleet still prevailed with its science and exploration first, defense and combat second mentality.
But then, after nine hundred years of proving the beaker is mightier than the sword, a mysterious scientific event causes a vast majority of the dilithium in the galaxy to explode, and after nine hundred years of keeping the peace with science, Starfleet reacts to this by abandoning all scientific and exploration initiatives and focus entirely on defense and security instead. And it stays like this for another century until a temporally displaced starship from the halcyon days of exploration arrives, defies orders, and manages to use science to solve the Burn and find a stockpile of dilithium in a mere matter of months.
So, to summarize, Starfleet, according to the "not a military" crowd are the soldiers who reacted to a devastating war by becoming scientists, and succeeded as scientists for close to a millennium until science scared them into becoming soldiers again, and stayed that way until the scientist ancestors of the modern soldiers show up and used science to solve their problems. To use the firefighter analogy, this would be like a city after a disaster that involved a ton of flooding deciding that water is the enemy and from now on they will fight fire with fire. And this works for several decades until one day the city's gasoline supplies ignite and go up in flames. In response, the fire department now uses water to extinguish fires, which they're struggling to do because no gasoline for the fire trucks. Until one day a bunch of old school firefighters from the past show up, and by fighting fire with fire again, they find a new stockpile of gasoline and usher in utopia.
Is this seriously the way Starfleet should be acting according to the "not a military" crowd?