Well, that's super easy: What changed his mind was that for the first time people thought that artifical intelligence could, theoretically, one day become truly intelligent. As soon as the possibility of "true" intelligence entered the scene, not just the fakery of it, Roddenberry immedialy switched back to his humanitarian, liberal-minded side.
That's a specious oversimplification at best. It's not as if the concept of strong AI never existed before 1973 -- I have no idea where you're getting that idea. Even Asimov's robots with their strict Three Laws programming were always portrayed as fully sapient beings, and were often the heroes of the stories. Questor is nothing if not reminiscent of Asimov's R. Daneel Olivaw (and indeed I've always seen Robert Foxworth as Daneel in my mind's eye when I read the Robot novels). Eando Binder's 1939 short story "I, Robot" (whose title Doubleday stole for Asimov's first robot-story collection over Asimov's protest) is about a robot that possesses consciousness (hence the title) even though it knows people will never accept the fact. Said story was adapted by
The Outer Limits in 1964 (with Leonard Nimoy), so it's hardly as if the concept was unknown to TV writers at the time. In real AI research, scientists in the field were saying as early as the 1950s that they believed artificial intelligence would match human intelligence within as little as two decades.
And of course, let's not forget the one time TOS
did portray AI more positively and sympathetically, in "Requiem for Methuselah." Even if she was fatally incapable of processing emotion, the episode did treat Rayna as a conscious, thinking, feeling person who had lived and died.
Also, Gene Roddenberry did not exist in a vacuum, and neither did
Star Trek. TOS was a show that had many creators, and those creators were drawing on many tropes from the culture and literature that preceded the show. As I said, the trope of AI as a threat to humanity has been part of science fiction since long before TOS and continues to be to this day in franchises like
Terminator and
The Matrix, though we often get more ambiguous takes like
Ex Machina and
Humans. And of course, stories that painted AIs more sympathetically have been part of the literature for generations as well. Arguably this dichotomy goes back to what's generally considered the first science fiction novel,
Frankenstein. Both sets of tropes were already well-established and available for TOS's various writers to draw on, but "Requiem for Methuselah" was the one time they really went for the more sympathetic approach.