Pragmatic, Moral, and Legal Obligations are very different things. It is possible, for example, for something to be morally required but not legally required (e.g., charity, kindness), legally required, but not morally required (driving on the right rather than the left side of the road), etc.
These distinctions are important because there is a common argument form that is clearly invalid. It goes something like this:
- Action x is immoral.
- Therefore, action x is (or should be) illegal.
But it simply does not follow that just because something is immoral it ought to be illegal. Consider that there are many immoral things that we do not want to be illegal. Adultery, for example, is clearly immoral but is not illegal. Why? Because we really don’t want to spend the limited police resources we have investigated every alleged case of adultery. We may also think that this is not a public matter, but only a private matter. (Many other reasons could be given.)
But does the fact that adultery is legal entail that society condones acts of adultery?
Imagine if adultery had been illegal from time immemorial, would making it legal now indicate that society now approves (or disproves less) of adultery? Not necessarily. It may be that society has simply come to a pragmatic judgment that this is not what we want to spend our limited resources on. Or that this type of action should not be legislated about, etc.
Now in the hypothetical world where adultery was going from illegal to legal many would object that we ought not to commit adultery and that making it legal would mean that it is now okay to do it. But this confuses the different senses of ought. Whether adultery is a crime has nothing to do with whether adultery is a sin. (Minor complication here: it may be that we have a moral obligation to obey the law in normal circumstances in which case making it illegal would make it immoral, but this is pretty controversial.)
These reflections are important for Catholic Church people because they too often make the slip from we believe that action x is immoral to the conclusion so we should want x to be illegal. But this is not a good argument either.
Thus, there is a logically coherent position that is often overlooked whereby one believes that some action x is immoral (because one is Catholic, say) and yet does not want action x to be illegal. Why not make it illegal? Perhaps because it isn’t the best use of resources. Or one may believe that each person should be allowed to decide issue x for themselves. (E.g., Catholics believe that it is immoral for a Catholic to voluntarily not attend Mass, but no one thinks that Catholics ought to be legally required to attend Mass. Attending Mass is an individual choice.)