In general we like to think that what is legal is also ethical. Of course, the issue of ethics is clouded with uncertainty. Not everyone sees the same things as ethically acceptable. Some insist that ethics are defined by a divine revelation and are therefore inarguable. Others see ethics as a personal matter, dictated by one's own heart. Some embrace what could be called a flexible standard, one which defines whatever promotes self interest as the only good.
We often hear a complaint that some law violates someone's ethics. Often the ethics in question are those derived from a religious understanding of a divine text. But not always. Some significant portion of the conflict between what is legal and what is viewed as ethically proper is driven by empathy for the less fortunate.
Generally we don't denounce people for showing compassion, but we do routinely experience or at least observe situations where what may be seen as an act of kindness on the one hand is also viewed as illegal. The common factor in these morally ambiguous situations is that the one to whom kindness is extended is a lawbreaker in some sense. We all have heard that aiding a criminal makes you a criminal. Kindness may be normally commendable, but if the beneficiary is a lawbreaker, kindness can be a crime. One can easily see how such situations are ethically complex and therefore not easily dismissed as requiring no consideration of other than their legality.
So much of our political turmoil seems rooted in a black and white mindset, which insists that societal issues are simple and straightforward. The proper answer is said to be readily apparent without much if any further thought or deliberation. Often this obvious answer is to return to the practices and attitudes of the past, in some sense. In an ever changing world, the past will likely remain a thing of the past.
A generally accepted ethical standard becomes more and more difficult in a diverse society, especially one with access to global information technology. The common ground of a shared religious tradition no longer serves as the primary ethical basis. All this means that we are in a national phase where it behooves us to recognize the new reality.
If there is any common ground to undergird our legal system, it won't be found in religious thought which preaches exclusiveness and demands doctrinal conformity. Such promotes disunity, the very opposite of what is required. Somehow what is compassionate and benevolent needs to be made congruent with what our laws and legal system promote. Instead, we have a legalistic mindset which makes illegal what is generally seen as noble and righteous in a broad range of religious traditions.
Promoting what is good through our laws strikes me as more important to our freedom, religious and otherwise, than stigmatizing what is bad through legal sanctions. Undeniably there is great room to debate what is good and bad, but a legal system which focuses almost exclusively on harsh retribution will necessarily ignores the more noble aspects of human relationships and societies. When human kindness, graciousness, and peacefulness become denigrated and even made unlawful within a society, then we ought to wonder if things are amiss. No one should be penalized for acting in accordance with the Golden Rule, a recognized common element in the ethics of almost all societies.