I dunno how they lost in court... its no different from any other trade secret - I assume they made him sign a NDA...
Ruins the fun of the show even if it was a bit silly.
If he's been replaced I could see how an ongoing gagging clause could be seen as a restriction of trade and unenforceable, the fact we know now who the stig was doesn't take anything away from what he did at the time, and we don't know who the stig is now. I can't see why the BBC have kicked up such a fuss about this and given the publishers free publicity.