Nah, NASA isn't the military. It makes use of military expertise, like how a news network might hire a retired general to comment on military matters, but NASA doesn't wage war, have members who take an oath, etc.
Coming late to this, but hey, since the 70s NASA has been the military's bitch, at least with respect to the manned program. The entire manned program post-Apollo and -Skylab was with the orbiter, and once they started compromising on the design and the costs went up, they absolutely needed DoD dollars, which is why the payloads were disproportionately military, and also inflicted some other design changes with regard to payload capacity.
With this in mind ... NASA is being used to wage war, because it provides the means for DoD to pursue its objectives. If you're doing a PATRIOT GAMES hit and want to see the action from a satellite, guess who probably placed it there?
All of this is at a total remove from the Apollo era, when the military's space program was essentially shuttered (no Manned Orbital Lab, instead eventually Skylab, no Dyno-Saur, instead the Orbiter, after a fashion.) So you have NASA, which was kicked into prominence to reply to an international political situation, going from a fairly military-free program into one that was dependent on military support, in less than a decade.
So, to get back to the main line of questioning ... if we can have this kind of upheaval, who knows what could have gone on in Starfleet during a century or a decade, stuff that didn't fit into any of the told backstories (and I'm not EVEN going to try to fit UESPA into the Starfleet/Fed thing, because that makes it sound like a civilian program got folded into a military one, and we wouldn't be having THAT in an evolved future, would we?)
Moreover, we're in a unique situation with seeing character stuff over a long haul with some ... so you have their perceptions changed not just by their experiences, but by what they know or have learned about others. I don't for one minute believe the TUC Kirk of 'let them die' infamy is genuine, or even heartfelt (in this, I totally agree with Shat's notion that he is instantly embarrassed for even blurting it, and think Meyer's cutting was a very shortsighted choice), but he certainly was capable of feeling that for a short time in extreme instances.
But Kirk seems to me to be much more about beating HIMSELF up over things that went badly over the long haul, not about carrying grudges. maybe that is because he won so often that he didn't have to carry grudges, but that is a key aspect to how I see his character, informed somewhat by the novels but principally from Shatner, Coon & other key TOS creatives. So when TUC is used as a Starfleet equals military argument, are we assuming it is a change in the trek universe due to meyer or a change in the Federation? If the latter, do we assume that the SFS-TUC era -- which I think of as the X-FILES/TRUST NO ONE era of TREK, since you have some serious surveillance going on with McCoy after Genesis and a real serious paranoid tone in SFS and then again in TUC -- is driven by events we don't even know about, but are enough to make the whole 23rd century seem very retro-20th when looked back at from 237_? (I suppose the abramsverse is kind of stuck in something like this, since it doesn't really put across any of the boldly going stuff with conviction, but uses buzzwords like 'armada' and 'enlist' that push much more conventional MIDWAY/RAMBO buttons vis a vis the military.
When we see the TOS era from the TNG one, there is the usual distancing with 'cowboy diplomacy' and the like, as if, 'yeah, that was before we were civilized' was the mindset. But is it really valid? Just because the frontier era had better color, music, editing and fight scenes doesn't make it less civilized or evolved. In fact, you can probably find as many examples of Kirk NOT doting on the military POV as you can the opposite, such as when he is telling Garth that he thinks of himself primarily as an explorer now. And Kirk goes out of his way to avoid blowing up ships after he has damaged them, same as Picard, though he may have to do some 'kirk strategy' in order to reach that point, instead of just having a vessel 80 times more powerful, which seems the TNG way of taking out the other guy's defenses.
Both of them show similar colors when dealing with hopeless hatfield&mccoy situations - see PRIVATE LITTLE WAR and SYMBIOSIS for the closest parallel -- and yet Kirk is perceived by more viewers as a warrior than an explorer, even when he has made choices that define him not as strictly impulsive or combative but actually answerable to his conscience in nearly all instances. In a real military, could Kirk manage to pull half of this shit and even stay in the service as the guy phasering dust mites off the EXIT signs at HQ? Just the political damage he'd do to his superiors in taking the rules and making them work for his ethics would make him untenable in no time at all, because even when you win big, you make enemies, and therefore he should have the biggest enemies (or the greatest volume of them anyway.)
To me, the fact that Kirk prospers (to some degree) in his career suggests he works for a group that has a military structure applied to a civilian organization, rather than the reverse. And it would follow that there could be aspects of that organization that are the CAPRICORN ONE-style secret portions, a la sec31, which could report to a higher or more secret or inner gov't WHILE technically being a part of the civilian org. A lot of Starfleet's perception as military could just be how the government elects to portray them ... defenders when you need starships built, explorers when you don't ... and there is even Roddenberryesque justification for this, since he seems to think that solutions to all things come from going out there, so that means you get your military and tech and resource stuff answered by going boldly, and therefore your point guys for this are the civiilian science guys who understand chain of command and can also fire phasers, if and when there is a need to do so.
I suppose you can put up so many alternate scenarios that pretty much any grand unified theory would be useless ... reconciling Jellico with TNG only works for me because Jellico is what I always knew they needed but figured they had been afraid to show ... then you see Ron Tracey and you wonder 'did this guy snap like Decker or was he always this much a mess?' and there you have a Starfleet that seems dangerously unenlightened, one where maybe you COULD make captain in an insanely short period of time without assassinating your way up the chain of command, but would anybody be willing to serve in that situation, especially with the ethical issues associated - which takes us up to PEGASUS, which seems entirely 23rd century or earlier in its outlook (outside of Picard, who of course has the high ground because he has the best posture.)
I had such a concise clear idea of what I was writing when I started this, and now I have no idea what that neat point was ... damnit!