Religions vary in their degree of idiocy, but I reject them all. For most people, religion is nothing more than a substitute for a malfunctioning brain. --Gene Roddenberry
Do you happen to know from what time period this quote comes?
Roddenberry's beliefs changed over the course of the years, the quote from the OP perhaps does not reflect Roddenberry's thoughts at the time of the episode.