A person is deemed to not be guilty unless convicted
In Canada, by s. 6 of the Criminal Code, "a person shall be deemed to not be guilty of the offence until he is convicted." This is also bolstered by s. 11(d) of the Canadian Charter of Rights and Freedoms which guarantees the right "to be presumed innocent until proven guilty according to law in a fair and public hearing by an independent and impartial tribunal."
There is always a chance that the tier of fact is not convinced beyond a reasonable doubt
The accused (and therefore their lawyer) cannot be sure that the evidence will leave the trier of fact (judge or jury) with no reasonable doubt that the accused committed the crime. Thus, the accused and their lawyer can only "know" the accused is guilty in the colloquial sense (in that they did the things that could be found to be a crime). However, they cannot know that they will be guilty in law. There is always a chance that the trier of fact is not convinced.
Ways that the Crown's case can fall apart at trial:
- what appeared to be convincing to the parties just isn't convincing to the trier of fact
- a key witness or evidence becomes unavailable
- it turns out critical evidence was obtained contrary to constitutional principles
- a key witness's credibility or reliability crumbles on cross examination
- the prosecution is complacent in diligently moving the trial forward and the trial drags on to the point that a stay of proceedings is warranted (e.g. in jurisdictions with strict rights to timely trials)
The interest in truth-seeking is not the only component of a fair trial
Fair trials should seek the truth, but they should also be timely (Jordan), and they should also not rely on evidence obtained contrary to the Charter (Grant). Fair trials are not only about securing convictions when a person did the things that could constitute an offence if proven.
At base, a fair trial is a trial that appears fair, both from the perspective of the accused and the perspective of the community. A fair trial must not be confused with the most advantageous trial possible from the accused's point of view. Nor must it be conflated with the perfect trial; in the real world, perfection is seldom attained. A fair trial is one which satisfies the public interest in getting at the truth, while preserving basic procedural fairness to the accused.
R. v. Harrer,  3 SCR 562, at para 45
The lawyer's duty
Tuckiar v. R  HCA 49:
He had a plain duty, both to his client and to the Court, to press such rational considerations as the evidence fairly gave rise to in favour of complete acquittal or conviction of manslaughter only. No doubt he was satisfied that through [an interpreter] he obtained the uncoloured product of his client's mind, although misgiving on this point would have been pardonable; but, even if the result was that the correctness of [another witness]'s version was conceded, it was by no means a hopeless contention of fact that the homicide should be found to amount only to manslaughter. Whether he be in fact guilty or not, a prisoner is, in point of law, entitled to acquittal from any charge which the evidence fails to establish that he committed, and it is not incumbent on his counsel by abandoning his defence to deprive him of the benefit of such rational arguments as fairly arise on the proofs submitted. The subsequent action of the prisoner's counsel in openly disclosing the privileged communication of his client and acknowledging the correctness of the more serious testimony against him is wholly indefensible. It was his paramount duty to respect the privilege attaching to the communication made to him as counsel, a duty the obligation of which was by no means weakened by the character of his client, or the moment at which he chose to make the disclosure. No doubt he was actuated by a desire to remove any imputation on Constable McColl. But he was not entitled to divulge what he had learnt from the prisoner as his counsel. Our system of administering justice necessarily imposes upon those who practice advocacy duties which have no analogies, and the system cannot dispense with their strict observance.
A laywer's obligation is to put forward on behalf of their client their best efforts. Whether they "know" their client is guilty of the offence charged or not, to do otherwise amounts to a dereliction of duty and weakens the protections afforded all of us who believe in the rule of law: Arthur Maloney, Q.C., "The Role of the Lawyer in Society" (1979) 9 Manitoba Law Journal 351.