
The roots of modern Western legal institutions and concepts go back nine centuries to the Papal Revolution, when the Western church established its political and legal unity and its independence from emperors, kings, and feudal lords. Out of this upheaval came the Western idea of integrated legal systems consciously developed over generations and centuries. Harold J. Berman describes the main features of these systems of law, including the canon law of the church, the royal law of the major kingdoms, the urban law of the newly emerging cities, feudal law, manorial law, and mercantile law. In the coexistence and competition of these systems he finds an important source of the Western belief in the supremacy of law.
"A bizarre example may shed light on the paradoxes of a legal tradition that has lost contact with its theological sources. If a sane man is convicted of murder and sentenced to death, and thereafter, before the sentence is carried out, he becomes insane, his execution will be postponed until he recovers his sanity.
Generally speaking, this is the law in Western countries and in many non-Western countries as well. Why? The historical answer, in the West, is that if a man is executed while he is insane he will not have had the opportunity freely to confess his sins and to take the sacrament of holy communion. He must be allowed to recover his sanity before he dies so that his soul will not be condemned to eternal hellfire but will instead have the opportunity to expiate his sins in purgatory and ultimately, at the Last Judgment, to enter the kingdom of heaven. But where none of this is believed, why keep the insane man alive until he recovers, and then kill him?
The example is, perhaps, of minor importance in itself; but what it illustrates is that the legal systems of all Western countries, and of all nonWestern countries that have come under the influence of Western law, are a secular residue of religious attitudes and assumptions which historically found expression first in the liturgy and rituals and doctrine of the church and thereafter in the institutions and concepts and values of the law. When these historical roots are not understood, many parts of the law appear to lack any underlying source of validity." (pp 165-166)
If you strip away this interesting theological context, the insanity defense doesn't make any sense.