If America locked me up and tortured me for years without trial, I'd also want to kill as many Americans as I could upon release.
Well yeh, any punitive action is going to backfire, particulary if the people are innocent. However keeping a bunch of people locked up is very expensive and really bad PR, so I'd imagine the Americans wouldn't go to these lengths unless they hoped the payback was worth it.
I guess they are hoping to be out of there by the time these people are released anyway, then they are someone else's problem.
It's an easy moral choice for Americans anyway, if the ultimate safety of your country is a concern and a few Muslim peasants stand in the way of that, then it's a no brainer to torture them in order to dismantle their various groups.
Given that they have already pee'd thirteen trillion up the wall just on pacifying these peasants, then only the people who are already well off and can choose to make a career out of being holier than thou actually care any more.