Morality is the only thing worth legislating! Name one law that isn’t legislating morality.
Lots of laws. For example, basic laws about driving. We keep right except to pass. There is no morality involved here, and the law itself is arbitrary. We all need to drive on the same side of the road for safety, but there is nothing about the law that actually conveys morality or lack thereof. Similarly, the law requires that children in a certain age range must attend school. This is beneficial to society as a whole, but there is nothing particularly moral or immoral about choosing to send your child to school or not.