The first Episode is " Man Trap" on TOS. Which Star Trek are you talking about? You have to be a bit more specific as to what you are addressing here, as there are numerous STar Trek spin off series now with very different things happening within the Federation of Planets. The first episode is about a shape shifting alien manipulating and endangering the crew. It focuses much on the strengths and weaknesses of human and humanoid "feelings" or lack there of.
Much of the various Star Trek series focuses on human nature's strengths and weaknesses. Starfleet is not always supposed to be " the good guys" and it often focuses on forcing people to make hard choices for the betterment of mankind. Often it portrays decisions in shades of gray rather than clear cut right and wrong. Most episodes involve testing the crews ability to abide by the " prime Directive" by attempting to force their hand or make impossibly difficult decisions:
en.wikipedia.org
Evacuating a planet would be a violation of the prime directive. As Scientists, they are supposed to be studying them, not interfering with them. They worry about exposing the civilizations they are observing or changing the natural course of the civilization's development. By even seeing a starship, it could change the entire course of their development from that point on. It is sort of like scientists we have now that study a pack of lions, they generally do not interfere and " save the antelope from the lion" or break up a fight between male lions because they will kill one another, they are just supposed to be observers and whatever happens happens without their interference either way. Besides, it is not even within their capabilities to be equipped or able to save other civilizations, and may just make things worse, not better while they pick and choose who they will save and who they will not. The point of those things is to try and force the crew to make difficult decisions, and show that they do not always make the right ones.
It is like the chain of events set off from " saving the antelopes from the lions" by saving the antelopes, it leads to the extinction of lions in the future. Star Trek has a lot of " because this happened, even if the action was good, it caused this other horrible thing to happen later in the story line" You have to keep watching to figure out why things played out the way they did in another episode. Sometimes the really horrible things have to happen in order for something more important to the story line to happen in a later episode.