I'm not a pro-lifer, (if pressed for a position on the issue, I'd probably say I favor abortion being legal) but just to try and steelman the pro-life position here:
First off, if a person is drowning and you know you can save them, and you don't, and they die, maybe you haven't necessarily committed a crime in the eyes of the law, but would you be able to live with yourself?
Second off, depending on the circumstances and what jurisdiction you are in, sometimes it is a crime to sit back and watch someone die. Parents generally have a level of duty to ensure the safety of their children. And if you put a person into a situation where their survival depends on you, and then you fail to save them, you are guilty of manslaughter or murder. By choosing to have sex (assuming the pregnancy, like most pregnancies, was not the result of rape), you put the fetus into a situation where its survival depends on you, since otherwise the fetus would not exist and would therefore not be in any situation at all. (Side note, this argument could be extended to say that a rapist whose rape baby gets aborted is a murderer, which is possibly the most roundabout way of arguing for the death penalty for rapists.)
Third off, pregnancy isn't THAT dangerous. If you live in the US, you have comparable odds to die in a car accident during the 9 months of a pregnancy as opposed to from complications with the pregnancy itself. Do you still drive a car anyways?
Fourth off, aborting your pregnancy is actively killing a fetus, which is arguably morally distinct from merely not saving it.
Fifth off, even if your survival requires the death of another person, that doesn't necessarily mean you are legally/morally justified in killing them. For example, even if you are starving to death and the only possible way for you to survive is to kill and cannibalize another person, it's still not legal for you to do so (at least, not in all jurisdictions. I didn't do that deep of a search on the legality of desperation cannibalism for the sake of a tumblr post defending a position that I don't even hold.) And, like you yourself said, you are neither legally nor morally justified in killing another person to get a life-saving heart transplant.
"But what about killing in self-defense? Most people agree that that should be legal." The person getting killed in that scenario is usually not innocent, and often deserved to die anyways, unlike in the cannibal or heart transplant scenarios.
In a moral framework that considers fetuses People, one might say that abortion is an issue of the bodily autonomy of the fetus more so than that of the mother, since nothing affects your ability to use your own body more than your death.
I would like to repeat, though, I am not a pro-lifer. I believe that the needs of society at large outweigh the needs of any particular individual (regardless of whether or not a fetus counts as an "individual") and that, in some ways, abortion may be better for society (by preventing the births of people who will in some way become problems, such as those with Down syndrome or unloved children who would have grown up to be criminals). Maybe abortion being legal also has negative effects like contributing to culture not valuing families as much. Whether or not one outweighs the other, I cannot say for sure, but politically speaking, I prefer to err on the side of letting things be legal, because I believe an unnecessary law is an immoral law.