louise - there would have been a plea arrangement between the parties that OP was pleading guilty to CH.
Then off to court for the Judge to sentence - where she will listen to the plea in mitigation fir the accused and the recommendations of both prosecution and defence as to sentencing. Sometimes, as part of the plea bargain, they will agree to recommend the same sentence. But the ultimate decision is down to the judge.
The Judge cannot compel the state to prosecute on any charges. It is for the prosecution (on behalf of the state) to decide what the charges should be and what will be prosecuted, taking into account the evidence, the likelihood of success and matters of public policy.
This is why the DPS is currently getting a kicking regarding all of their recent failed sex abuse cases
Thinking about things last night, I am wondering if a plea bargain was mooted by OP's team but the prosecution felt they had a good chance on the murder conviction