Earlier quoted context omitted.
Note that miscarriages are counted as spontaneous abortions in most medical statistics, which was super confusing to me when I first saw similar data.
Miscarriages are abortions. Often times if the miscarriage happens late enough, a doctor must intervene to assist in the removal of the dead fetus, which is the same medical procedure as one may remove a viable one.
The medical procedure you're referring to is dilation and curettage (a.k.a D&C / DnC). The common term "abortion" is imprecise, and refers to several medical procedures, and D&C has multiple uses other than pregnancy termination.
In the case of spontaneous abortion (commonly called "miscarriage"), even in early pregnancy if the fetal remains are allowed to naturally be expelled, afterward the ob/gyn will often need to inspect the uterus and perhaps remove some remaining tissue. So, rather than waiting for the fetus to naturally be expelled following spontaneous abortion and going through the pain and trauma of seeing the blood and tissue being passed at home, the ob/gyn will often advise a D&C rather than waiting for the body to naturally resolve the lost pregnancy.
Unfortunately, my wife has had 3 first trimester miscarriages under 2 ob/gyns, both of which advised D&C rather than waiting for the fetal remains to pass. Also, her ob/gyn performed a 4th D&C to make sure the surface of the uterus is free of tissue that might interfere with pregnancy. This 4th D&C seems to have worked (along with a ton of medications), as we're expecting identical twins in September. Every D&C weakens the cervix, so it's a delicate balancing act.
In any case, D&C has several uses and shouldn't be conflated with "abortion". In our case, my wife's 4th D&C was a fertility treatment, and the first 3 were to resolve lost pregnancies.