It is due to the definition of “mortal sin”. Mortal sin requires three things:
- Grave matter
- Full knowlegde
- Deliberate consent
Murder certainly meets the condition for grave matter. Unless the abortionist does the abortion on accident, that leaves the second condition: does the person committing murder know what they are doing? Do they understand? That may change from one abortionist to another, so we cannot say that such murder is
always a mortal sin. If fact, we cannot say that any sin is
always mortal sin because there is a possibility that the person doesn’t know what they are really doing.
In the case of abortion, I believe it is almost always a mortal sin for the abortionist and mortal significantly less often for the woman, as many are presured into it and ill-informed.
You can read more about the difference between mortal and venial sin
here.