If you mean Karl's legal fees to his own attorneys. Karl was paying a lot for his attorneys, which is particularly peculiar since his attorney didn't specialize in defamation law or anything. People are speculating that Karl was so confident due to his youtube bubble that he deliberately racked up enormous legal fees, under the theory that he would inevitably win, and in Australia that would require Billy to pay the fees if he won. If that's true, that obviously backfired.
If you mean legal fees in terms of damages, by default it's compensatory, meaning they try to calculate the amount of damages Billy sustained due to Karl's defamatory actions. Since Karl ran a multi-year smear campaign where he attacked Billy and published false defamatory information to millions of people with a reckless disregard for the truth. Billy was able to show sufficient damage and lost opportunity to the court to show that Karl's actions had an effect on him. Usually this involves lost business, medical bills, etc.
Also, in a typical case, someone in Karl's position would want to mitigate the amount of damage they did to Billy. Karl instead chose to continue defaming Billy even as he was being sued for defamation. In particular, once Karl's claims were shown to be false to Karl himself, he showed little intent to retract or correct the statement to minimize the damage to billy, and instead chose to continue to slander Billy for years after that.
Altogether, this demonstrated to the judge that this was not an honest mistake on Karl's part. He was hellbent on harming Billy regardless of whether his claims were true or false. He ordered aggravated damages, basically recognizing that Karl's actions were particularly distressing to billy.
They could be way higher actually. The judge wanted to award much higher aggravated damages. And if it's anything like US tort law, he could optionally award punitive damages due to Karl's outwardly malevolent intentions about all this.