You're quite right, @Bobblebottle.
It's dangerous to apply anything other than cold logic to the law.
I realise I'm opening a whole can of worms here, but we should also recognise that many serious birth defects are undetectable until near full term. It's usually due to micro-deletions, of which there are many.
These pregnancies are often aborted, but communicated as late-term foetal deaths. Reason being the foetus was unviable or barely viable; it's marginally less awful for the mother than going through an assisted birth then having to wait for her child to die.
In fact, two of my relations experienced this. One chose abortion - she told people her baby died in the womb, which is true. The other went through an induced delivery. Both women, obviously, have suffered greatly with their losses ... but the first handles it better. I imagine a 20-hour birth, knowing the baby's already as good as dead, is more horrible than making one awful decision and then being able to get on with processing the emotions.
My closest friend was pregnant with multiples, which were not thriving. She took the option of aborting all but two, who are now extremely healthy twins. Yet another case where 'killing babies' was the right and most constructive choice, in face of nature's unpredictability.