In the late 1800s and early 1900s the US disliked ANY regulations (Congress started the modern concept of Regulations with the passage of the bill forming the Interstate Commerce Commission, the ICC in the 1880s but even then the concept of "Self-Regulation" was the rule of the land. Modern Regulations really only started in the 1930s with the passage of the New Deal. Even with the passage of the New Deal Regulations, how do you regulate something like prostitution, when most regulations rely on self reporting? Now, Self Reporting was backed up by audits and the potential of lawsuits, but how do you audit a Brothel? I do NOT mean the books of the Brothel, but if the women are their voluntarily (and in such a situation that the woman feels free to tell the truth). to test to infections even of the woman refuses to be tested. How do you make sure the women only work in certain areas (Which is generally the big issue for the business community, they do NOT want prostitutes on the sidewalks in front of their business, nor want them any where near the business community, let other women take offense at seeing the prostitutes). Remember, most prostitutes operate alone, but a good many operate under the direction of a pimp. How do you make sure the pimp is NOT getting all the money? Even when prostitution was legal, the women turning tricks often did not even have a place to live other then whatever room they were given to perform their tricks.
Now, do NOT confuse high end prostitutes with streetwalkers and other low end prostitutes. No one cares about the High End Prostitutes for most of them get a good share of the money paid to them to have sex (Thus the police do nothing to them for they are "safe" for the women to work in). The fact they can be arrested for what they are doing puts a severe restrictions on what they can do and stay open. The problem is the lower end of the scale. The pimps and procurers at that end provide minimal services (if any) to the prostitutes working for them and get most of the money. This was true even in the days when prostitution was legal. One room, with no heat was common for such low end prostitutes (Even in areas where heating was available). Their pimps wanted them broke so that that the would take in as many customers as possible and then after the pimp would take almost all of the money. Since the activity was legal, the police was limited to what they could do. i.e. the Police could not arrest the prostitute to get her away from her pimp even if it was clear the pimp was going to do her bodily harm.
One of the best example of this is the Story of Solomon and the two prostitutes. If you remember the story, two women of the town each gave birth, one of those children died, the other lived. Both prostitutes claim the child was theirs. How do you decide who is the real mother before the days of blood tests and DNA testing? The wisdom of Solomon was to convert the case from one he could NOT determine to a case he could determine. Thus Solomon asked his soldiers to cut the child in half, given half to each mother. The one mother said that was a good solution, the other mother said, she had lied, is was NOT her child and the other Mother should get the living child. Solomon at that point gave the child to the woman who said she had given up her claim for the child for it was clear the child would be better off with her then with the Mother who was willing to let the Solomon cut the child in half. Thus the wisdom of Solomon, he converted a dispute from one he could NOT decide do to the lack of facts (i.e. who was the real mother), to one he could decide (Who would take better care of the Child).
The courts have followed Solomon's example throughout history, converting cases that could NOT be decided to one that could be decided. Under the Common Law Homosexual conduct was illegal, but so were Police and what we now call District Attorneys. Thus if the only way a Homosexual would be charged, is if the person he or she has sex with would bring the action including hiring an attorney to present that case to the Grand Jury, and then to try the defendant for the crime of being a Homosexual. Furthermore under the Common law it was not only illegal it was NOT permitted for the Defendant to testify at trial. Given that set of facts how could anyone be charged with doing a Homosexual act (Before the adoption of the Modern Police and District Attorney Office in the 1830s)?
The answer is simple, it was just not done except in Military cases (Which tend to be tied in with Military Discipline) or in Political Cases (Someone was charged with being a Homosexual by his political enemies, the truth of the accusation was generally unimportant. the classic case in the Franks Case that Hitler used to remove the head of the German Army in the 1930s so Hitler could appoint his own man to that position).
Thus why was homosexual behavior illegal under the Common Law? To understand that you must also understand that under the Common Law, the age for consent to have sex was 12 (It has been increased in every Common Law Jurisdiction that I know of but only since the 1800s). Thus if an older male raped a 12 year old, the burden of proving the lack of consent was on the 12 year old. On the other hand, if the crime is NOT rape but just having Homosexual sex, then all the 12 year old needs to prove is he and the older man had had sex. Much easier to prove. Now technically both person accused would be sentenced to be hanged but it was common for the King to grant pardons (In fact by the late 1800s so many crimes were death penalty cases, that it became the norm for Juries to convict someone of a crime, the Judge to sentence him or her to death by hanging, and then the King would pardon the Defendants while before he or she was hanged).
Thus the law against Homosexuals was NOT intended to go after adult homosexuals but pedophiles.
Another area of the law was the 1600s and 1700s transportation of Criminals to the English Colonies. Under international law of the time period it was illegal to exile convicted criminal (This ban was ignored by the British after 1780 when it came to Australia) but if a person NOT yet convicted would agree to be shipped to the British Colonies as an indentured servant, such a "voluntary" decision to migrant was perfectly legal. The person who the Defendant did the crime against would agree to accept payment to settle the criminal charges, then the Defendant would be "sold" to a Captain who then shipped him or her to the British Colonies who then resold the Defendant (Generally for such criminals the time period was 14 years, unlike the more common 7 years for people NOT accused of a Crime). Thus the fear of being sentenced to death, permitted people to agree to pay off the fine.
Just pointing out, the law has made things illegal at times, so to better regulate other things.
More on the Spithead Mutiny of 1797:
http://en.wikipedia.org/wiki/Spithead_and_Nore_mutinies A more recent example was the Glass–Steagall Act. While technically it was to separate investment banks from you local bank, the main thrust was to separate PEOPLE who did investment banking from people who did local banking. Thus two corporate "Cultures" could developed. A cut throat one in Investment Banks, and "I know I am protected by Federal Law and thus I will invest the bank's money conservatively" for regular banks. It was this difference in investment Cultures that Glass–Steagall Act was intended to developed (and did till it was repealed in 1999).
More on Glass-Steagall:
http://en.wikipedia.org/wiki/Glass%E2%80%93Steagall_Act