Laws are mostly based on public order. If murder was legal, then any killing would be likely to result in a revenge killing and ultimately in vicious feuds. It’s when laws are based on supposed morals that troubles begin.
You think adultery is immoral? Outlaw it. You think that drugs is immoral? Ban it and put the users in prison for a long long time. You think that violation of laws is immoral? Then make prisons places of revenge not rehabilitation. And be sure to make their incarceration public so that they won’t be able to find a job or place to live when they do get out. As mentioned above, traffic laws are not about morals, but order.
Unfortunately, all too many powerful people confuse their self-interest with the requirements of public order. What’s good for General Motors is good for the country. The argument against regulation is really public order against private interest.