Criminal trials are about testing the evidence. The issue in any criminal trial is whether the prosecution can prove its case with legally competent evidence beyond a resonable doubt. In a perfect world, that would always lead to the truth, but this is not a perfect world. It is about the defense testing the prosecution's evidence. I don't know if my client is guilty, even if I know that my client committed the act with which they are chargedm it doesn't necessarily follow that they are guilty of a crime.
Guilt is a matter for judges and juries to decide.
For example, if I shoot you and you die, we know that I killed you, but we don't know that I am guilty of murder. I would be not guilty of murder because of self defense even though I committed the act of killing you. I also believe that every person, no matter how heinous the crime, is entitled to the best defesne possible. If we do not protect the constitutional rights of even the person who committs the most heinous act, we cannot trust that those rights will be there for us and our children when we need them. That can happen.