This woman wanted to develop an infection so that she can abort and not have to deal with this situation.
You remind me of another concern that has been expressed in post-Roe times, which is that women who have a natural miscarriage could be accused by some especially aggressive and suspicious DA of having intentionally caused the miscarriage.
Sometimes a woman has a serious accident, such as falling down a flight of stairs, and the trauma induces a miscarriage. There's been at least one case where this happened and the woman was subsequently arrested and accused of intentionally falling down the stairs because she wanted to abort.