Correct because the purpose of our legal system is not justice, it is to follow and interpret the laws whether they be just or unjust.
I certainly understand why you say that.
But, consider this. A validly passed and/or created law is a law. Period. It might be unjust, as many laws have been. It may be just, as many laws are.
Nevertheless, just or unjust, a law is a law. It is what The People want, and so long as it's not unconstitutional, a law it remains.
If the purpose of our legal system were to selectively follow the laws it decided just, and selectively ignore the laws it decided were unjust, wouldn't we in essence be disenfranchising ourselves in favor of a dictatorship of judges? That is, it wouldn't be our elected representatives that were making our laws, but rather our judiciary deciding which laws were to be followed and which laws were not to be followed, on the whims of the judiciary.
This is why I'm a pretty strict advocate of following the law to the letter. It's not a judge's place to question the law, except when there is an issue of its constitutionality. Instead, it's the legislature's and executive's role to tell me what the law is, and then it's the judge's job to apply it as they have written it (same with the Constitution, but keep in mind that it's written using very ambiguous terms, which is purposeful).
Put differently, a judge can't necessarily do what he or she thinks is right. A judge
must do what the law, as ultimately created by The People through their elected representatives or as expressed in the Constitution, tells him or her is right. A good judge is one who understands that, and is able to apply the law as written (again, unless it is unconstitutional for one reason or another).
And, in those instances were we feel like the judiciary has gotten something wrong or we simply don't like a result, the solution is easy. Judges are not God on Earth, so to speak - checks and balances apply to the judiciary, too. In other words, it's within the power of the legislature to simply pass a new law overriding a court's interpretation (you'll see statutes saying that a particular case's interpretation is wrong and is not what the legislature had in mind); it is also possible to amend the Constitution if it's interpreted in a way that We the People deem inappropriate.
Anyway, like I said, I understand why you wrote what you did. I know it can often appear that way, and even now I sometimes have a similar reaction. But, what I wrote is something to keep in mind, I guess.