When a corrupt deputy sentences a man to death for the crime of fornication, Shakespeare asks us to consider whether or not morality can or should be legislated. On the one hand, the play warns that men and women don't necessarily have the right to pass judgment on their fellow human beings. At the same time, Measure for Measure suggests that a person who commits a crime (or sins), should be made to pay – either by making some sort of restitution or by suffering an amount that's commensurate with the suffering he or she has caused.
In the end, Measure for Measure promotes mercy and temperance rather than an "eye for an eye" system of justice.
Although Measure for Measure acknowledges that social problems related to the sex industry exist, it also argues that sex (and morality in general) cannot and should not be regulated by the government.