לזכות א"מ ר' יצחק יונה בן חנה
וא"מ מרת הענא מרים בת חנה
The Rambam writes at the end of the 18th perek of Hilchos Sanhedrin:
It is a Scriptural decree that the court does not execute a person or have him lashed because of his own admission. Instead, the punishments are given on the basis of the testimony of two witnesses. Joshua's execution of Achan and David's execution of the Amalekite convert because of their own statements was a directive of immediate relevance only or was by royal fiat. The Sanhedrin, however, may not execute or lash a person who admits committing a transgression, lest he become crazed concerning this matter. Perhaps he is one of those embittered people who are anxious to die and pierce their reins with swords or throw themselves from the rooftops. Similarly, we fear that such a person may come and admit committing an act that he did not perform, so that he will be executed. The general principle is the disqualification of a person's own testimony is a decree of the king.
This is soooooo oddddd!! The Rambam starts by saying that it is a גזירת הכתוב not to execute one based on his own admission and not based on human logic. Then he explains the rationale behind it [perhaps he is an embittered person etc.]. Then he concludes that it is a גזירת הכתוב [with no rationale].
So what's the deal??