In fact lawyers sometimes are required to do so and simply can't just pull out. But they have ethical restraints placed upon them in respect of how they run that person's case. They can't suggest to any witness or the jury for instance somebody else did it. It simply putting the prosecution case to proof and it is the right of the accused to do so. Although that comes with a price at sentencing if the case is proven beyond reasonable doubt.Sorry, I’ve probably watched too many Hollywood movies where the lawyer knows their client is guilty but defends them anyway.