Episiotomies are one story. C-sections are another. It can happen that a C-section is the only possibility. It can happen that on the face of things, at the outset, a vaginal birth would seem to be the way to go, but that as things develop, a C-section is necessary after all.
The woman goes into medical care with the hope that they will respect her wishes, but also, implicitly, that her first wish is that she and her infant shall survive. If that first wish is incompatible with her express wishes, and if there simply isn’t time to explain why it’s incompatible, the doctors cannot in good conscience just throw up their hands and say OK it’s your funeral.