I see no LEGAL reason why Khalid Sheikh Mohammed should be tried in a U.S. court of law. To me it doesn't make sense what so ever. Mohammed is not an American citizen nor is he a legal U.S. resident. If he were in the country when he planned the attacks, then I can understand why he would be tried in the U.S.
But right now, his status is an enemy combatant, which is not a legal definition. It seems to me to be a loop hole created by the Bush administration because congress, which it has been doing for decades, has abdicated it's Constitutional authority.*
If a war cannot be fought against an entity other than a government, then congress should have added terrorist groups to the definition and then declared war against terrorist groups. Or, congress should have created another definition for the military action and the "legalize" that is involved. One glaring definition would define if "enemy combatants" are to be tried in military court, U.S. federal court, or something else.
But, I'm not a lawyer so what do I know?
* I'm one of those people who thinks congress sometimes writes laws poorly, with intent, so that people will challenge some laws and leave it up to the courts to figure out.