Criminal law should be based upon objective fact. Morality and civility are matters for religion and society, not the courts.
Sadly, without morality there is no law unless it is economic law.
Moreover, without morality, civilisation ceases to exist.
And without morality, humankind becomes just another beast.
So to exclude morality from the courts we revert back to a system of injustice.
In other words, mob rule... and a government prepared to engage in wholesale executions to maintain power and its position at the pinnacle of the food chain.
While many equate morality to religion, and yes, they can go hand in hand as religion attempts to create order within, religion and morality are not mutually exclusive.
Religion would struggle to exist in the absence of mrality, but that is not so in reverse.
Morality can and does exist in the absence of religion.
HUman decency is the prime core of morality, and without it criminal law becomes a farcical misnomer where the eveil and morally bankrupt pay for their innocence and continue to spread corruption like it were butter.
Unfortunately, that still happens in an imperfect world where many bandy the word morality as being a lifestyle yet fail to live it it any respect.
It is therefore a fool's folly to suggest that morality be banished to religion and allow the worst of human dregs to rise to the top and run society in a manner that is devoid of that which separates us from the savages who ruled through abject cruelty and having the biggest club.
Morality is the fabric of society and what holds us together. Without it we may as well return to the caves and drag our women around by their hair.