I think the old-timers among us must resign ourselves to the fact that there are now people out there whose first encounter with ST was not with TOS (even in strip syndication, with a UK print of "Spectre of the Gun" ["gin" instead of "corn whiskey"] even airing in some US markets [during the years that KTLA had it]), and never read any of the reference books that discussed airing vs. production order.
On the bright side, we get to sound like experts when you newers ask questions!

According to everything I've ever heard or read, "The Man Trap" aired first because NBC executives thought a show about a monster would be the most appealing to the people they expected to be watching.
That was certainly part of it, but if "The Corbomite Maneuver" was ready, Roddenberry would have wanted that one first and "The Man Trap" second. But not only was the episode not ready, NBC decided to premiere the series a week early as a preview week, so "The Man Trap" was it.
But even if they set the premiere as planned, "The Man Trap" would have been the only episode NBC would have wanted to lead off with at the time. It's not like "Charlie X" was gonna kick off the series.
And I cannot imagine that anybody involved would be so utterly wasteful as to not plan on airing the second pilot at some point.
The money was spent and the cost of the production could be amortized over the season by the use of sets and props. That is, if they didn't decide to change all the props and uniforms. Set changes were minor, though, and I'm surprised we didn't see the Talos/Delta Vega planet surface a few more times in the series. But maybe that stage was used for something else.
While "Where No Man Has Gone Before" could be slotted in anywhere and still be accepted, "The Cage" would probably be never seen until decades later because everyone but Nimoy was recast. Much like the Gilligan's Island, Lost in Space and other pilots which went hidden until DVD or special presentations. But, as said, they were behind schedule and over budget and needed a pre-made episode to slot in there.
I can't imagine Irwin Allen expected his Lost in Space pilot to ever air as presented. There's no story, just set pieces. He had to know he was front loading his series with expensive sequences he could use later with an elaborate "presentation" film. He even shot some in color for that reason, even though CBS wanted the first season in black and white. Even without the addition of Dr. Smith and the robot, I could see the series carving that footage up and spreading it out over a few weeks, much as it eventually did. It's the only one of his 60's pilots to be that radically different than the aired premiere. Voyage to the Bottom of the Sea did some minor dialog and music dubbing, Land of the Giants got a new score and reedited some intro scenes and The Time Tunnel just needed trimming for time - it was the most "ready for prime time" of the four. And it's a solid pilot.
I Spy held back their pilot until about 13 episodes in, not because of format differences, but because it was awful.

As a kid, I never questioned why "Where No Man Has Gone Before" was different. I just referred to it as "the one where Kirk has two stripes." Kids, man. We didn't care. It was our show and it was a great episode.