During the Festival, normally placid citizens of Beta III exploded into paroxysms of lust and destruction. Twelve planetaryhours later, the Festival ended, and the people resumed their calm and tranquil state, oblivious to the chaos they had created. (TOS: "The Return of the Archons")
No explanation for the Festival was provided within the context of the episode. In his novelization, author James Blish inserted dialogue from the sociologistLindstrom who had a theory: in Landru's perfect civilization, births would outpace deaths, resulting in overpopulation. Festival provided a more or less random means of keeping the population level stable. This is certainly the sort of strategy a computer programmed to view individuals as cells in a body might construct.