I suggest that you are a little confused here -- there is a significant difference between immoral and the illegal, and always has been, even in Biblical times; and the US Constitution recognizes that the majority is not always right, and should not be able to make illegal anthing it wants. For example:
* the "immoral" is something you disapprove of, something against your personal code of morality, and perhaps something you would be willing to personally convey your disapproval of, e.g., treating your spouse unkindly, allowing children to run around creating havoc unsupervised;
* the "illegal" is an action you would be willing to use force to prevent (or require penalties extracted by courts and men with guns, e.g., theft, murder).
For actions in which something of value is taken by one person from another by either fraud or force(e.g., fraud, theft, assault, murder), the line is pretty clear. Ultimately someone is taking something of value from another against their will, whether by fraud and deceit or by force, and that is almost universally recognized as both immoral and illegal. Over the past 2000 years, Western civilization has evolved the concept of a government using force to prohibit or take vengence rather than allowing people to avenge themselves; so laws are passed to codify transgressions, and police and courts enforce them. Of course, Islam still allows "honor killings" and "blood feuds" to settle scores.
The line is not so clear when there is no "victim". In the Old Testament, the Jews were prohibited from a number of activities, which made such actions immoral, but for which no specific punishment was specified. For example, working on the Sabbath was clearly a violation of one of the 10 Commandments (with an exception if an Ox fell into a ditch), but this was enforced by disapproval, not by stoning. Prostitution was clearly disapproved of, but evidently not prevented by force, since there are stories in the Bible about prostitutes; but, on the other hand, a couple could be stoned if caught in adultery if the woman was married (because this was stealing "something of value" from the husband). So even then, there was a difference beteween illegal and immoral.
That line has been moving.
*100 years ago there were laws in the South prohibiting places of business being open on the Sunday (i.e., the blue laws), and those laws had penalties; Walmart is now open 7 days a week 24 hours a day nation wide.
*100 years ago there were laws prohibiting the selling of alcoholic beverages in some states and localities -- a nation wide Prohibition was found to cause more problems than it solved, so Prohibition was eliminated by a 2nd Constitutional Amendment. If there is no difference between illegal and immoral, would you now say that drinking alcohol to excess is now moral???
*100 years ago, there were laws in many States prohibiting cursing in the presence of women or children. Some of those laws are still on the books, but now not enforced (although many of us would prefer that they were enforced, in Parks, and especially during TV family hour).
This then leads to the next question -- how should you draw the line between the immoral and the illegal? You can't say, strictly by the "will of the majority". The Declaration of Independence proclaims that all people have the G-d given right to life, liberty, and the pursuit of happiness. The Bill of Rights in the Constitution prohibits Congress from making laws about some lower level issues (i.e., establishing a religion, abridging the freedom of the press, even infringing on the right of a citizen to keep and bear arms, etc.) So, even if a majority of the people wanted such a law, the Consitution prohibits it. It takes in fact a supermajority to abridge such rights (e.g., with a Constitutional Amendment, like Prohibition).
Which brings us to things like prostitution, sodomy, homosexuality, cigarettes, recreational drugs ... the so called "victimless crimes".
Some these things involve the actions of a single person - use of sexual toys, masturbation, smoking cigarettes, taking any kind of drug, etc. The question asked in the 60s and not yet answered is ... what gives the "majority" the right to say that alcohol is legal, prescription drugs are sort of legal, and grass is illegal? The British fought a war with China to get the right to import Opium into China, so they obviously thought it was "moral". The history of drug laws in the US is covered quite nicely by the History Channel program, "Hooked, and how we got that way" -- and morality played less a role than press inflamed hysteria. My personal view is that drugs are bad, but drug prohibition is much much worse.
What gives the "majority" the right to make the purchase or posession of a "vibrator" illegal, when it is used by a single solitary individual in the privacy of their own bedrooms? Isn't that part of "the pursuit of happiness"? Yet Alabama has such a law.
Next are the so called "victimless" crimes between consenting adults. For example:
* What is the justification for using force to prohibit sex acts between consenting unmarried adults? 100 years ago, fornication was illegal; now, it is displayed on family hour TV shows.
* What is the justification for using force to prohibit prostitution in 49 and 1/2 states (it's legal in some counties of Nevada)? A Prostitute is listed as one of the ancestors of David ... and Jesus.
* What is the justification for using force to prohibit heterosexual sodomy? During the past 100 years, that line has moved - it is now legal nation wide, and legally exhibited millions of times a day on the internet.
* What is the justification for using force to prohibit homosexual sodomy? The laws have been on the books for over 100 years, but not really enforced for the past 50 years. The Supreme Court recently moved that line, rightly or wrongly, by balancing the right of the majority to make such laws against the rights of the participants to pursue happiness.
What is the justification for using force to prohibit polygamy? (It seems that G-d approved of this during Old Testament days, and I have been unable to find the Biblical commandment that now makes it immoral. Islam supports Polygamy as moral. The Mormons believed it was moral for a number of years; on the other hand, US Government troops occupied Utah under Martial Law until the Mormon Prophet had a revelation that switched this from "moral" to "immoral" for Mormons in the 1880s).
* What is the justification for using force to prohibit incest between consenting adults? Egypt's rulers were required to practice this. If your justification is the fear of reinforcing bad genes, then why don't you make it illegal for people with genetic markers for Sickle Cell Anemia to get married to each other? Or Tay Sachs? Or Obesity? or baldness? or ...?
When you are done with victimless crimes, consider the morality of self defense! Genesis requires you to rise up and slay an attacker at night. Jesus said ... if you don't have a sword, sell your cloak and buy one. Some states allow people to carry concealed firearms to protect themselves with no restrictions. Some 38 States have some kind of "shall issue" legislation which requires the police to issue "good citizens" a concealed carry permit, and laws which allow you to use such weapons to protect yourself and others from predators. Some states almost prohibit you from defending yourself with deadly force. What is moral?? All these laws were passed by representatives of the people (majority rule ???) So ... is morality dependent on whether you are in the majority??
The point of this rant is, your assertion that "...criminal laws (are) the codification of the "moral views" of the majority..." is too simplistic, and does not hold up to analysis. The question, "Which immoral things am I willing to use force to prohibit?" is a very serious one, and I would encourage you to find some principles by which to make such decisions, and to subject those principles to intense scrutiny and bounce them against the principles of the Consitution. Don't tell me "It's all in the Bible" -- because then you are saying that if you were born differently, you would be saying "It's all in the Koran". And you know where that leads.
But, as you so abundantly show in your post, the supposed "significant difference" between the immoral and the illegal is shifting rapidly! If today you can dismiss sodomy and incest as being in the realm of "immoral but not illegal", then what, exactly, is the basis for declaring bank robbery illegal? Why, inherently, is stealing illegal? If it is not because our society has declared it to be wrong, what is the reason? What is the basis for laws at all?
You might say something should be illegal if, and only if, it harms somebody else. While there is plenty of debate to be had over that idea in the first place, I would press further and ask, Why? Why is that the standard for individual liberty? Why should it be illegal for me to harm someone else? What makes that standard more desirable than a biblical standard, or a simple majority rule standard?
See, the slippery slope is this: Once enough people deny any difference between right and wrong in their personal lives, then the laws created by and for those same people will inevitably follow the same path, albeit in something of a delayed fashion. If there is no good and evil in our personal, private lives, there is necessarily a similar attitude toward our civic attitudes and actions. Those who think they can completely separate their personal and public lives are deceiving themselves.
You make a good argument for anarchy. I will bet that there is not a single law on the books that someone has not violated at one time or the other. I would futher venture that there are people who every day violate some law of which they are entirely unaware. I probably violate speed limits every day.