The defendant is charged with sexual abuse of a minor. The defense will not contest that the defendant knowingly engaged in a sexual act with the victim, but it will argue that the defendant reasonably believed the victim had attained the age of 16.
The victim does not want to testify, and the prosecution would prefer that she not need to testify. The prosecution - for this and other reasons - would like to secure a guilty plea.
The defendant is adamant that he honestly believed the victim was eighteen at the time. He directs his counsel to evidence supporting this belief, and her investigation corroborates his claim.
The problem here is that defense counsel believes she would likely elicit testimony supporting of the affirmative defense by cross-examining the victim. The prosecutor thus has at least two reasons to consider offering conditional leniency should be defendant agree to a trial bargain in which he waives the right to confront the victim. First, it protects the victim from further trauma through testifying. Second, it limits evidence that could favor the affirmative defense.
Again, the result is less favorable to a prosecutor than a guilty plea, so the defense would expect less favorable leniency than it would secure in a guilty plea. But less is not none.