maybe he meant that she wasn't suffering from a mental illness at the time. Depression could have come on after the event? pnd, depression brought on by the enormity of what she had done (it's not clear what happened to the baby, whether it was stillborn or whether she might have killed it or whether it died after birth).
Very sad for the baby and the two partners. Am finding it slightly less easy to have sympathy with her.
wannabe could be right about the timing of the mental illness - which means it might have been taken to be irrelevant to an assessment of her "guilt" or otherwise (in legal terms). In other words, what they probably meant was that no-one knew of her state of mind at the time when she concealed the birth, but I assume her mental state would be relevant to sentencing?