Time travel in Star Trek is a tricky business. As much as we try to make sense of it, and to be fair the way it works and the way historical changes affect the timeline is for the most part consistent, it still is āonly for the most partā. For every instantaneous change to history shown in TOS: āThe City on the Edge of Foreverā, thereās a kind of delayed effect as exhibited in DS9: āPast Tenseā. For every reset of the timeline in VOY: āYear of Hellā, thereās the lasting effects implied in SNW: āTomorrow and Tomorrow and Tomorrowā.
One conundrum is TAS: āYesteryearā, probably the most memorable episode of TAS. The set up is that Kirk and Spock are returning from a trip to Orionās past via the Guardian of Forever. When they emerge from the temporal donut, they are startled to discover that the McCoy and the party of welcoming scientists do not recognize Spock.
(As a side note, why donāt they remember Spock? As we saw in āThe City on the Edge of Foreverā, being in close proximity to the Guardian protects you from the changes in time - when McCoy goes through and changes history, the Enterprise vanishes from orbit but Kirk and the landing party still retain their existence and memories. One possibility is that McCoy took the scientists up to the Enterprise briefly while Kirk and Spock were in the past, whereupon they were subsumed into the changed timeline, but then we also know from āCityā that the trip into the past and back takes only an instant, no matter how long you stay in the past. Itās a problem, and Iām not sure Iāve got a good solution for it. But see below.)
Returning to the Enterprise, Spock discovers that he has never been First Officer (replaced by an Andorian) and in fact died as a child on Vulcan during the kahs-wan ritual. But yet, Spock recalls that during the ritual he was saved by a distant cousin named Selek. Realizing that Selek was Spock himself, Kirk surmises that history was changed because Spock followed Kirk to Orion and so didnāt go back in time to Vulcan. Spock realizes that he must go back in time and save his past self.
But this raises a slight problem - what was the original timeline to start with? If Spock originally died, then how did he grow up to go back to save himself? Is this a bootstrap paradox at work? But then itās not a perfect loop because the events of āYesteryearā only occur because the loop breaks, creating a new timeline in the middle of it.
(Also, given the very nature of time travel, Kirkās theory that history changed because Spock went back to Orionās past and he couldnāt be in two places at once makes no sense because itās time travel. Spockās journey into the past doesnāt have to occur at a specific time for it to work.)
So what gives here? The only way this makes sense is if, in the original timeline, the change in history and the paradox were meant to happen.
In the original timeline, Young Spock nearly dies in the Vulcan desert, but is saved by Future Spock. But this leaves the question unanswered as to why Future Spock is there to begin with - the impetus for him to go back in the first place. The only reason Spock goes back is because he discovers that if he doesnāt, Young Spock dies. And the only way he discovers this is because of the existence of the paradox of the new timeline.
So it wasnāt because Spock went back to Orion that caused the paradox, as if it was a choice that started the dominoes falling. Spock had to go back to Orion so that he would find out that history had changed when he returned, which would then lead him to go back in time to change history ābackā. The alteration in the timeline and the subsequent repair job was always part of the original history.
And perhaps that provides a solution to why McCoy and the scientists were affected by the timeline changes. Perhaps to impress upon Spock the necessity for him to go back in time, it had to be clear from the get-go that history had changed rather than for him to find out when he returned to the Enterprise.
And the entity that would be aware of this, and presumably have the capability to withdraw its protection from others, would be the Guardian itself. Well aware of how events are supposed to unfold and to protect the integrity of the timeline and Spockās place in it, the Guardian allows the timeline to be changed. It then makes sure that Spock figures out what he must do to revert the changes, the Guardianās own temporal directives preventing him from telling Spock outright. The best the Guardian could do was protect Kirk and Spockās memories, so that Spock would recall what was supposed to happen and Kirk to give him the support he needed to go back in time.
But then the question becomes why the timeline had this snarl in it to begin with? Was there a previous timeline before that where Young Spock did survive without intervention but temporal shenanigans took place to alter that original, leaving this as a patch job? Therein lies another discussion, perhaps, or a fanfic.