I've never bought the "If it quacks like a duck, and walks like a duck..." line of reasoning. In fact, I find it to be a quite lazy way to interpret the world. "If it quacks like a duck, and walks like a duck, then of course it's a duck... Or maybe a goose. Or perhaps a platypus."
Just because something at times "acts like" something we have in 21st contemporary Western society doesn't mean that it is automatically identifiable as that thing. Star Trek is set hundreds of years in the future. Go back in time an equivalent number of years, and the entire notion of what comprised a military was completely different. Just because something doesn't make sense doesn't mean that it is under any obligation to do so. It's science fiction for a reason.
I've seen the notion of the Federation's economy being devoid of currency brought up as another relic of the "Kool Aid" philosophy Gene Roddenberry championed. I have a degree in economics. Believe me, I've tried to rationalize how such an economy might function, and it makes my brain hurt. But that doesn't mean that I discard it as an element of Star Trek's universe. They say they don't require currency in the Federation numerous times, and it is reinforced across just about every series and film. It doesn't have to make 100% sense for me to enjoy it. It's a fictional universe. I accept what the people living in that universe say about it, because they are the ones living in it, not me.
It's kind of like trying to argue with Don Quixote about whether or not those things up on the hill are windmills, or if they are - as he believes them to be - giants. Yeah, we all know that they're windmills. But Don Quixote says that they are not, and therein lies the story.