Indeed, the court does not always let the justice triumph. Rather, it is more of a competition or, better yet, a sport. The only difference is that intelligence, knowledge of the laws and the art of persuasion are being used here. The one who wins this competition is - more often than not - the one who is wrong, but who mastered the art of dispute and rhetoric and applies all required legal techniques.
In court, each party believes that it is right. Everyone has their own truth. Evidences can be interpreted in different ways, and any position whatsoever can be justified. Just like there are two sides to a coin, every case can be considered from a different angle, sometimes from quite a radical one. This puts the attorney’s skills to the test. Even the most difficult situations may not necessarily be doomed. There is a story involving famous attorney Fyodor Plevako. It happened back in the days of the Russian Empire. There was a trial of a certain priest. His guilt was so evident that there was no way to even argue otherwise, but for him to beg for forgiveness and mitigation of punishment. The members of the jury – which was passing the judgment - must have already practiced rendering verdict in their heads. Finally, Fyodor Plevako rose to speak, “Well, the defendant's guilt has been proved, he himself confessed the crime and repented. His guilt cannot be denied. But let it be recalled that he, the priest, had been atoning for your sins for thirty years. Now he stands in front of you, asking you to do the same. Won’t you show him an equal mercy?” Naturally, the priest has been eventually declared not guilty, even though by law he should have been convicted. However, the attorney’s professional excellence completely changed the outcome of the trial. Realizing that there was no use in appealing to the facts - all evidence was against the accused -, he appealed to the jury’s feelings masterfully and won the case.
This example makes it clear that the attorneys have many tricks and techniques up their sleeves to successfully defend the client.