The reason you can't have a workable legal ystem based upon faith, is as saadia says, you are answerable to some god for your actions.
That's personal morality, not social engineering.
You are in effect trying to build a motorway flyover with Lego.
To run a society, you have to look at the consequences of your actions, not the actions themselves.
You need to think it through.
No religious book I've read has the hero taken up a mountain by God and told, "yes that action is within the law, but look at what happened when you did it, you fuckwit".
In a large society, the links between cause and effect are murderously hard, and inevitably that means you have to do "wrong" things to achieve the "right".
You need to accept that any justice system is a blanace between locking up innocent people and letting some guilty go free.
All relgions have an obsessive interest in the sex lives of other people, yet to enforce such laws is to impose conditions that can only ever be oppressive even to those who sexuality the men in charge approve of (and yes, they are always men).
The problem with having to do "wrong" things is the effect it has on men of high moral standing and intellect.
(and yes, it's men again).
When you do a wrong thing, hareful in your eyes of God, you are a bad person.
Almost no-one wants to be a bad person, and we observe that what actually happens is that in their hearts they convince themselves that the person they are doing the bad thing to "deserved it".
That's why punsihments in religious societies are invariably more cruel than in civilised ones.
A major factor in any useful justice system is relative deterrents. Thus people who fence stolen goods typically get harsher penalties than the actual thieves. This is because they are critical to the functioning of the criminal economy even though their activities rarely if ever involve violence or even stealing the goods themselves.
But the killer, the real fuckwitted core of what's wrong with faith as a way od making law is that you can't be wrong.
Until a few years ago a British man could not be convicted of raping his wife. That was a bad thing.
It was fixed.
At one point a married woman could not own property in her own right, again fixed.
Until the 19080s confessions were regularly beaten out of suspects by British police with the connivance of the judiciary. Now mostly fixed.
But you can't "fix" religious law. Yes of course you can tinker with the edges, but if the law says "X" and it's the law of god, then you're screwed.
Altough I am not superstitious, I see it as a monstrous and offensive conceit to the God I don't worship that sexually dysfunctional males can scribble a few words on paper, claim it is perfect (perfection in human works of course anathema to Islamic teaching), and then impose misery upon millions.
If you want to be nice to people because your invisible friend tells you so, I have no problem with that. The Islamic traditions of charity and hospitality are fine and wise. It's when you try to impose them on others and use it for managing the affairs of millions, not just the poeple in your tent that it works like a skyscraper made of cheese.