All laws are based on moral values. Ultimately, laws are moral judgments; I don’t see any reason to deny that, or to object to it. It is unavoidable. Even if you want to argue that a law is in place for reasons of public safety, or what have you; that contains a moral judgment. When you say that certain things like, say, smoking should be banned, but not other things that are potentially health hazards; you are making a moral calculation of some sort. Any restrictions on personal freedom are derived from one or another political, moral, or ethical philosophy or religion. And yes, societies have a right to hold whatever particular philosophy or religion they do, and to regulate society accordingly. You can disagree with it, but who cares? More often than not, your disagreement arises out of perspectives that are, comparatively speaking, historically immature. Human society discovered a very, very long time ago that “people should be allowed to do whatever they want”, does not contribute to the longevity of the community.
It is a massive mistake to dismiss traditional values simply because they are traditional. It is also a mistake to assume that views that oppose traditional values represent an evolution in our thinking; there have always been people who opposed traditional conservative values; they just tend to fail to deliver long-lasting benefit, so people have learned to sideline them, and opt for the tried and true. You cannot responsibly disregard millennia of human experience and expect to get positive results.