Law isn’t the problem.
Morality is.
Law IS a problem when it protects the immoral and punishes the moral.