But that's not what you said. You said "The writers and the actor were smart enough to keep him consistent." You're inferring that he was consistent throughout the entire series, and he wasn't. His character changed from the beginning of the series to the end because of character development. His character changed throughout the TOS movies as well. His character changed yet again in "Unification," and finally changed again in Star Trek '09. The only consistent thing about Spock's character is its inconsistency
You're associating development with inconsistency. It's not inconsistency if the development is happening along a curve. There's a difference between randomness and progression.
Spock smiles in "The Cage" but the reason for that is solely behind the scenes. Spock was not established as the analytical emotionless character. Number One was supposed to be the analytical one. Spock gained the analytic and emotionless demeanor only beginning with "Where No Man Has Gone Before". So that was inconsistency because the character's parameters had not yet been established. It was simply a reality of television production.
Now, setting aside "The Cage", if we look at Spock's development over the course of three seasons, he mellows a bit. Kirk used to rib him in the first season for becoming more human all the time. Spock did tell Rand a joke in poor taste but Spock did have a sense of humor throughout TOS, a dry sense of humor and Spock would deny it, but it was there.
After the five-year mission, Spock probably felt that he had spent too much time around humans and that it had affected him, and it would make sense for that to prompt him to wish to attain Kholinar to purge all emotion. To "purge" all emotion instead of just submerging it would mean control tighter than ever before. When he doesn't attain Kholinar, returns to the Enterprise, and makes contact with V'Ger he has the equivalent of an emotional release. The reason why he couldn't attain Kholinar is because he could never purge the emotional pressures he wanted to submerge.
By TWOK, he's clearly accepted his two halves. That's not inconsistency. That's character development, getting older, maturing, and reconciling the different parts of who you are.
This all gets reset by TSFS so it takes until TUC to get back to where he was at TWOK and then move on from there.
But Spock's development after "The Cage", when the writers and Leonard Nimoy figured out who the character was, was not inconsistent at all. It's called growth. It happens to all of us. It happens to you, it happens to me, and it even happens to Spock, fictional or not.