I'll add that when I say Starfleet was only "kinda sorta military", it isn't so much a statement about the fictional Starfleet, but about the way Hollywood tends to write about the military. A bunch of "yes sirs" and "yes ma'ams" doesn't necessarily make for interesting viewing, or offer insights into the human condition. You need that friction and argument to make the drama that make sci-fi interesting for most adults.
You get something very similar in Space Patrol: The Fantastic Adventures of the Spaceship Orion (which premiered in Germany a week or two after Star Trek premiered in the U.S.) - or maybe even more so. I've read that the idea of underlings questioning authority was actually more the policy of the German military in the 1960's due to their unfortunate history of "just following orders", but even then, it would make for a pretty chaotic organization in real life if it went to the extent that it did in either fictional organization.
P.S. - If you haven't watched Space Patrol, you might want to give it a try. It's pretty good, and fun to compare and contrast with Star Trek since they are contemporaries.