The distinction between law and morality is a fundamental one in legal philosophy.
It’s not whether you’re right or wrong that’s important, but how much money you make when you’re right and how much you lose when you’re wrong.