According to the Mishna (2a) all capital crimes are judged by a court of 23. The Mishna continues and teaches that when an ox gores and kills a person, the ox will be taken before a court of 23 who will pass judgment on the animal and kill it if it is found to be responsible for the person’s death. The source for this, according to the Mishna, is the passage (Shemot 21:29) that teaches ha-shor yisakel ve-gam be’alav yumat – “the ox will be stoned and its owner will be killed, as well.” Rather than decreeing a death penalty on someone whose ox killed a person, this pasuk is understood to teach that the ox will be tried in the same manner as a person would be tried, under these circumstances.
The idea that an animal that kills a person should be treated as a “murderer” rather than as someone’s property that the court needs to destroy is explained by the Ramban as stemming from the Torah’s declaration in Sefer Bereshit (9:5-6) that the blood of someone who was killed will be “demanded” by God from the perpetrator, whether man or beast. The Torah clearly states that this is necessary because of man’s creation be-tzelem Elokim – in the image of God.
The Talmud Yerushalmi takes a different approach and suggests that we would view the entire incident as a monetary trial – that the owner of the animal is being judged simply to clarify whether the court will need to destroy his property. The court of 23 judges is necessary because of the gezeirat ha-katuv – the Torah’s requirement – but not because we view this trial as a capital crime. This is likely the position taken by those Sages who rule that the animal is put on trial only if there is an owner. If the animal has no owner, these Sages see no need for a trial or a formal death sentence on the animal – although the court may choose to destroy the animal in order to remove a dangerous creature.