Sometimes governing is about doing what's necessary in the face of public opposition.

How many millions should Canada spend defending a losing case, only to wind up paying not only damages and our costs, but Khadr's costs as well?

The court of public opinion is not a court of law.  I'm quite happy to see a government that places law ahead of public approval, for once.