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.