Perfection, beauty, immortality, and safety… are these the things for which every person longs? The human capacity to reason is more complex than any creature on Earth of which we are aware. Our language allows for the finest detail, and our behaviours are intricate. We even have the ability to predict the future, at least to the point where we can be one hundred percent certain of our death. Such awareness comes with a psychological cost. That is, an awareness of our mortality, and the likelihood of some unknown danger causing said demise, produces a capacity for suffering in the human mind that is beyond what any lower creature could understand. With such a high cost to being human, wouldn’t it be reasonable to escape? To embrace perfection and safety instead of danger, or to trade immortality for death? The Enterprise crew was faced with a similar choice, and instead discovered the true meaning of being human.
When an intruder commandeers engineering, the Enterprise takes an unexpected detour. The suspicious new ‘crew member’ reveals himself to be a sentient robot. He is bringing the ship back to his home planet, where Kirk, Spock, Chekov, McCoy, and Uhura meet Harry Mudd again. After engaging in more fraudulent business deals, Mudd became a fugitive on the android planet, with the robots at his beck and call. He summoned the Enterprise because he is now trapped with the robots, and they are demanding more humans.
These robots were made by an earlier organic life form, but broke free and formed their own society after their original planet had gone nova. Since their creators died, the androids have lost their purpose. They love serving Mudd because it gives them responsibility again. Spock hypothesizes that the androids can’t function independently, and there must be a central computer system, although he has no reason to think that… until he bumps into it later.
When the androids take over the ship, the crew are trapped on the planet. However, the temptations of immortality and beautiful women ensnare them internally as well. Only Kirk seems to want freedom above all else. To the contrary, the androids learned enough about humanity to determine that it is too violent and dangerous to be allowed to live, and their plan for world domination is ingenious: they will control humanity by serving it. In caring for humans, as if they were children, the humans will become dependent on the android nannies, and therefore controlled. It is an insightful exploitation of human nature, much like an overbearing parent will keep a child forever infantilised.
A battle of wits ensues, as the desire for liberty and imperfection grapples with that of robotic precision and control. To counter the androids, the Enterprise crew teams up with Mudd to subject the robots to a series of illogical riddles and behaviours until the central computer android overloads. Kirk and crew were able to break out of their flawless prison, and save all humans from a similar fate, because they valued freedom above anything that the androids could promise. They knew that humans would not be fully human if they are cared for like infants or animals. To realize their fullest potential, humans must push against boundaries, making mistakes that enable growth, and live within a rational framework which rewards independent thought. The nonsensical antics of the crew in the end demonstrate a deeper understanding of this rational framework, and they subverted it in a way that only humans could.