Even where someone denies guilt there may be practical reasons where they want to plead guilty. For example, the likely sentence is not significant and the accused did not get bail. Or there is a good deal on a plea and a finding of guilt is likely after trial.
Despite this a lawyer may not, ever, assist in a guilty plea where someone denies guilt.
R. v. Cameron, 2014 ONSC 2093:
 What is most troubling is the role played by trial counsel. A defence counsel cannot represent a client entering a plea of guilty to an offence that the client does not admit he committed. To do so is to assist the client in perpetrating a fraud on the court. Such fraud leads to a miscarriage of justice and brings the administration of justice into disrepute.
 In the Defending a Criminal Case: Special Lectures of the Law Society of Upper Canada 1969(Toronto: Richard De Boo Ltd., 1969), at p. 318, this issue was addressed in the following exchange between Chief Justice Gale and Mr. G. Arthur Martin:
Chief Justice Gale: Mr. Martin I'm going to ask you to continue with it. What is the position of counsel where his client has informed him that he is not guilty but he wishes to plead guilty … because he thinks he will get a lighter sentence…?
Mr. Martin: To permit a client to plead guilty who is innocent and who informs you that he is innocent is really in the nature of a fraud on the administration of justice and is improper….
I think … that so long as the client persists in maintaining his innocence after you have confronted him with the evidence against him, and have explained the relevant law, that it is preferable not to represent him for the purpose of entering a plea of guilty.
 The duty and expectations of defence counsel as described more than 45 years ago by Mr. G. Arthur Martin are still the same today.