The court or "the law" cannot afford to be philosophical on the beliefs of crime, the statement Innocent until proven guilty is there to protect those who are following the law. Because as soon as the law becomes a philosophical matter then more complicated issues like Determinism take factor and no one is being punished.
Your example:
Person A commits a terrorist attack.
He is known to be a terrorist.
He pleads not guilty.
Just asking for clarification here.
Edited 4/27/2016 09:21:49