According to E.V. Walter's article "Nature on Trial: The Case of the Rooster That Laid an Egg", such medieval animal trials where very similar in spirit to witch trials: the guilty animals were often believed to be possessed by evil spirits, demons, or the Devil himself. In "Legal Lore: Curiosities of Law and Lawyers", William Andrews writes about a particularly famous trial agains a cock which laid eggs:
... Satan employed witches to hatch such eggs, from which proceeded winged serpents most dangerous to mankind
and
The poor cock was convicted, and condemned to death, not as a cock, however, but as a sorcerer, or perhaps a devil, in the form of a cock...
Therefore, it seems that there was no attempt at explaining in a rational or concrete way the acts against the natural order for which the animals were punished. They were simply
the supernatural results of sorcery, or the work of Satan himself.