Well, from an evolutionary POV, if a woman gives birth to 3 kids and the last one kills her, but all 3 kids survive, it’s a win for mother nature. Evolution favors the species, not the individuals.
And the reason it is so painful is, again, part and parcel of the reason we are dominant.