This trope recurred several times ("A Taste of Armageddon," "The Apple," and "I Mudd,") but this episode succeeds as a coded commentary about the rigidity and dogmatic nature of organized religion, as well as a warning about a society that, though computer control, has sacrificed its humanity.
In “The Return of the Archons,” the U.S.S. Enterprise investigates the culture living on an M-class planet known as Beta III. One hundred years earlier, another Starfleet vessel -- the Archon -- disappeared while exploring this very world.
The episode thus belongs more in the camp of “Who Mourns for Adonis,” -- an episode which suggests mankind has outgrown its need to “worship” any God -- than it does fare like “A Taste of Armageddon.”