And I'll say it again, real slow, just for you: Pass all the laws you want, but you can't legislate morality...
Keep repeating an inane and self-contradictory saying, and it remains an inane and self-contradictory saying.
For your line of reasoning to be valid, you would have to prove that the passing of a law never changed anyone's behavior, never made them reconsider their morality or their actions, and never reformed public behavior in the slightest. This is manifestly untrue.
Sure, in many cases legislating morality does not work, because the legislation itself is a bad idea, especially when overwhelming numbers of people do not agree with it. This was the case with alcohol prohibition, for example.
In other cases, legislation not merely reflects the dominant views of society, it also transforms the views of society, and educates those who might otherwise have not agreed or not have understood the need for the legislation in question.
The State is every bit as much a moral educator as the Church or any other actor in society. And when the State is corrupt, so too its laws. You cannot pretend that the laws have no effect on the moral education of the people, or that laws only reflect what people already believe without influencing their behavior. There is controversy over every law precisely because the law is an influence on society, for good or ill.
Every law is an act of legislating morality. Only in a truly corrupt, decadent, and immoral age could so many people lose all understanding of the moral import of the laws - a basic theme of all thought concerning society since before recorded history, and a major theme of Western thought going back to Aristotle, Plato, and Socrates. They for one would have laughed uproariously at the notion that "you can't legislate morality", and would have assumed, rightly, that the person making such a claim was morally and intellectually blinkered, and was trying to put beyond public debate political questions he preferred not to have debated publicly.