Another good question. The Church's answer is that everything must be done to save BOTH lives. That is not quite satisfying; it seems that sometimes saving one means the death of the other. If that were to occur, then the choice is forced, involuntary.  Given the forced choice, it is more reasonable to preserve the life of the mother.  She is more fully "actualized," so to speak; more a person.  Which is not to say a fetus is not a person; only that a mother is more so.  Again, given the forced choice, an involuntary choice, I don't see how it could be otherwise.  This is a situation of "double effect."

It's like the hypothetical where you're out in the freezing ocean after the holing of Titanic. You have a life-vest that can support two people. A mother is 100 yards away, and you can make it in time to save her if you start paddling NOW. 100 yards away in the opposite direction is a toddler. Who do you swim toward? This is an analogous situation.