The cases were dismissed without evaluating the science because of Mann's behavior. The people he sued wanted to just get on with it and debate the science, but Mann literally filed suit and then never turned up to his own legal proceedings. Hence the judge's displeasure.
Apparently Mann tried to make the same argument you made about not losing the case. He lost all the cases. If the judge dismisses your case that is losing. You don't get to file a lawsuit, never turn up and then when the judge tosses you out, claim you won.