Let's ignore the edge cases of being committing violations of unjust laws, malum prohibitum crimes, and stick with something like: Client accused of murdering 40 year old woman Client admits to you he murdered 40 year old woman because he felt like it. No police brutality, confession issues, whatever [1].
I'm of course, not saying they should be strung up. But trying to get them off on a technicality serves nothing. If they go free, it serves no overall goal of the system.
[1] Note that for things like the exclusionary rules, this is actually why a number of 'conservative' justices don't like them - they are actually in agreement that stopping police from committing constitutional violations is a worthy goal, but do not believe letting guilty people go free is the way to solve that problem.
If a defendant wants to skip the trial and admit guilt, that's a different matter.
A fair trial is not a purpose, it's a means to an end (punishing people fairly). It is not even a necessary component. The only reason it exists at all is because of our inability to objectively determine guilt in most cases. The rest are tacked on (IE determinations of what crime has been committed. Even this would be solved if you could objectively determine what occurred)
However, again, if the defendant admits guilt (even if not in public), but still wants a trial, can you explain how the system is served by a fair trial on guilt or innocence for him, rather than a fair sentencing hearing?
In that case, the guilt or innocence is not in question. The same is true when they only admit guilt to a defense attorney. Defending the client, and trying to get them off during the trial stage, does not serve the ends of the system. It may, depending on how formulated, serve some of the means, but that's kind of irrelevant.