Christopher, I think you and I have either slightly or somewhat different assumptions, here.
First of all, if Gary Seven were operating in the context of real life secret agents, "Gary Seven" would not be his code name, because that name occurs on all of Gary's forged credentials, e.g.
http://tos.trekcore.com/hd/albums/2x26hd/assignmentearthhd0462.jpg and
http://tos.trekcore.com/hd/albums/2x26hd/assignmentearthhd0463.jpg. As a fake name on ID cards, the proper term would be
alias. The purpose of a secret agent's code name is multifaceted, but one of those purposes is to protect the identity of the agent. The name "Gary Seven" clearly does not serve that function, since he's openly telling it to everyone in the clear. That right there would be evidence that secret agent tropes are being used in the teleplay both imprecisely and therefore erroneously, if this is how we are to interpret the meaning of "code name". It's worth noting that that would be the natural interpretation in the context of the episode.
It's also worth noting that the names "agent 201" and "agent 347" do qualify as properly used code names in the teleplay, by the real world standards of secret agents.
In any case, the purpose of the code name "Gary Seven" is certainly not obfuscation. If we are to accept that the term
code name is in fact applied accurately, then we must resort to a context besides secret agents.
Code names are applied in many different ways by a variety of organizations. One application of code names is for an organization to assign unique identifiers to its items, when those items are created or acquired by the organization.
The Manhattan Project is perhaps the preeminent example in the real world of something that is known only by its code name, which was assigned to it when it was created. Yes, a major purpose of that code name was to disguise what the goal of that project was, but the project simply had no other name at all, ever, at least as far as I know. But another purpose of that code name was to make sure that the referenced project had a unique designation. The fact that there is only one correct way to decode the code name is one of the most important properties of codes that is being exploited here.
An example in science fiction would be
The Andromeda Strain. That is the organism's code name, and it is not known by any other name. The coding mechanism is what assigns the unique identifier, and that mechanism ensures that the code has any other properties besides uniqueness also demanded of it. In the case of Macintosh operating systems, such an additional property would be that it be a big cat name.
So, to get back to what I was assuming about Gary Seven, I was assuming that the code name Gary Seven was assigned to him at birth, to ensure that he has a unique name for all time in the organization. Heck, maybe he didn't even know or use that code name growing up. Maybe only once he graduated into training to become an agent was his code name revealed to him. He could have been given a name by his parents that was entirely different, I'll acknowledge that. But the aliens would want to give him a unique designation so they could classify him for all the various attentions that he required, whatever his ultimate role was or wasn't, since in any case his whole life existed within the context of their operation.
I agree that it's not necessarily true that the aliens abducted the ancestors by force. The humans could have gone willingly to serve their gods, for example.
I also always assumed that the aliens would be able to convince the human subjects, by laying it all out, that they were doing the right thing. Gary Seven is a true believer, and I don't think for one second that he was brainwashed or coerced in any way. To me, this is how I imagined that the aliens demonstrated their benevolence. If we are going to be idealistic, then the aliens would never have to worry about whether their project would collapse, for example due to the people refusing to cooperate, because they would be able to persuade them logically. Perhaps also they take good care of the people who don't go on to become field agents.
That said, Gary is arguably better trained than Kirk is. I'm not talking Salusa Secundus here, but Gary must have been to one helluva Kung Fu school.