The US legal system has absolutely nothing to do with the 10 commandments.
One popular argument for why the 10 commandments should be on the walls of a courthouse or in front of one is that our legal system is actually inspired by the ten commandments. See also god has written the law on all of our hearts, or something similar.
But I would say that not only is our government not based on the ten commandments, some of the way our government is set up directly contradicts the ten commandments. I'll use the protestant version as that's the one I was raised with.
You shall have no other gods before me.
Already we have our first contradiction. The first amendment states that congress can make no law respecting an establishment of religion, or prohibiting the free exercise thereof. Specifying which gods you may have in which order is a law respecting an establishment of religion.
You shall have no graven images, don't worship them or serve them, etc.
Another contradiction. Worshiping graven images is exercising your religion. To have a law against that would be unconstitutional.
You shall not take the Lord's name in vain.
I'm not aware of any blasphemy laws that are enforced by the federal government.
Honor the Sabbath Day.
Now this is an interesting one as there used to be a lot of people who would close on Sunday, or do similar things to respect the sabbath. But most of those were decisions from people, not any laws from the government. And whatever laws there might have been are long gone by now.
You shall honor your father and mother.
Interestingly enough Eastern cultures tend to be more concerned with honoring parents than western culture. But either way there really isn't any laws or anything in our government that requires honoring parents.
Thou shalt not kill.
Now all the way in 6 is the only commandment with a direct correlation to the american legal system. But not killing isn't unique to the ten commandments. There were legal systems that existed before the bible that had this rule. Now you can argue that it's 'god writing on people's hearts' but considering how few of these rules are commonly recognized now or in the past as moral and necessary for society I kind of doubt that's the case. But you can't argue that it's because of the ten commandments.
Adultery.
I am not aware of any laws now or in the past against adultery.
steal.
See killing.
lying
Depends on how you intrepret it. If you intrepret it as pejury then we go back to the not unique. If it's lying in general, there are good reasons to lie (like protecting jews from nazis)
Coveting.
Do I even need to explain this one? George Carlin did a whole routine on how our economy is based on coveting. If you're confused on this one let me know.
So all ten commandments and there are only 3 with direct correlations to our government and laws. And those 3 aren't even unique to the ten commandments. Or the first ones to say it. So when our laws only have a 30% correlation with the 10 commandments I honestly don't understand how anyone can say they are based on the ten commandments.