I guess it is a small mercy that the little girl will not remember it or be brought up by this woman. Since she's a baby I'm pretty sure there will be hundreds of people absolutely dying to keep her and give her a loving home, it's her older kids who will have a harder time of it depending on how old they are and what sort of mother she was to them, it would be nice if they were kept together (the kids).
If she is mentally ill then she should get help, in those circumstances she shouldn't be sent to jail ( the prisons are already full of people who should be getting treatment but aren't and once they are released they re-offend and end up back in jail), if she doesn't have a relevant mental illness then she should do time in an actual prison with no concessions, simple as that.
Either way, it is worrying to think that someone with mental problems (if what the witness is saying is true, then it will have been obvious) can be pregnant and not be monitored for their own safety and that of their baby, or that an adult (without mental illness) can think they can give birth and abandon the baby and no-one will notice, care or question the whereabouts of the child once it has been born but is not present.