Why we need criminal defense even for guilty people

Why do we need investigations in support of accused criminals?

I am working my way through Brandon Perron's guide to criminal defense investigations, Uncovering Reasonable Doubt. The very beginning presents two quotes as answers to the question above.

"It is better that ten guilty persons escape, than one innocent suffer." - Sir William Blackstone

"I hear much of people's calling out to punish the guilty, but very few are concerned to clear the innocent." - Daniel DeFoe

Both quotes focus on the status of the accused person. I agree that protecting innocent people from wrongful prosecution is one reason we need criminal defense investigations. However, I think there is another very important reason, and this additional reason is just the opposite side of the same coin.

We need criminal defense investigations to hold the government accountable for the power we citizens have invested in it.

As citizens we give to the government our rights to use deadly force and to imprison others in the service of retribution. I cannot imprison you or kill you if you commit a crime against me. Only the state has those powers now. Because the state has this tremendous power over our lives, we owe it to ourselves, to each other, and to the integrity of our legal systems to hold the state to extremely high standards of conduct when the state is trying to prosecute a citizen for a crime, even when we know the defendant is guilty of the crime.

The status of the defendant is not the only moral concern. Holding the government strictly accountable for its immense power is an equally important moral concern. And those are the two reasons we need criminal defense investigations.