People tend to assume laws are right, fair, just, and moral. They're not. People also assume right equals fair equals just equals moral. Again, they're not.
There may or may not be overlap on many of these but there's never a 1:1 relationship between any of them.