Carrier captains in the U.S. Navy don't fly F/A-18s into combat.
No, no they don't. But carrier captains also aren't the protagonists of fiction that audiences want to see having adventures.
Yes, it's more realistic for a nameless person that the Captain sees once or twice a year aboard a large ship to be the one that's sent into danger. Star Trek
just isn't set up that way. If it were "Lower Decks," 24/7, then yes, what you want, the nameless ensign sent into harm's way, would be the right way to do things. But because our heroes are at the top
of the command pyramid, they're the characters audiences want to see doing things.
It is "wrong," according to the way militaries work? Yes. Is it wrong according to the way fiction