The ruling explains the logic near the last page of the decision -- it's basically "Epic didn't have to break their contract in order to sue". I think it's the judge slapping Epic on the wrist for grandstanding, even though they basically-won.
> It is certainly a victory for junk legalese that you can write an illegal contract, have it ruled illegal, and still enforce it.
From the ruling (page 172):
> In California, “where a single contract provision is invalid, but the balance of the contract is lawful, the invalid provision is severed, and the balance of the contract is enforced.”
In other words, even though the judge found the anti-steering provision of the contract to be illegal, the rest of the contract was still legal and enforceable, and Epic violating the other terms of the contract entitles Apple to damages.
It wasn't illegal until this ruling. She didn't make it retroactively illegal, so Epic were still in the wrong at the time. Seems pretty obvious to me.