Sometimes it's not really the trial court's fault that it made a mistake, and hence gets reversed. To take but one example -- here, the losing party relied on Argument X below, but Argument X was meritless, and the trial court rejected it and entered judgment for the winner. On appeal, the losing party totally abandons Argument X and instead relies on a totally different Argument Y. With which the Court of Appeal agrees, reversing the judgment below.
Not the trial court's fault (though it might have done some research itself). Not the Court of Appeal's fault, which is permitted -- though not required -- to consider new legal arguments on appeal.
Just an example of the Court of Appeal being (rightly) concerned about obtaining justice. Even if it means reversing a decision below where the trial judge made a decision based on the information and arguments that he had available to him.