Custodial sentences are for serious offences, Beth. They're for more than to protect the public, and include deterrent and punishment.
This was a woman who got pregnant by one man, then returned to her partner and wanted to get rid of the unborn child, even after eight months pregnancy.
I did see that she admitted another charge to the original. But the judge is reported to have stated that had she pleaded guilty at the first opportunity, he would have passed a suspended sentence. I suspect the answer is that she refused to plead guilty to child destruction, took the case all the way to trial, with the additional costs and use of court time, and then pleaded guilty to something that was just as serious as the original charge, and that the prosecution was content to accept.