She can't avoid it. Or perhaps, from the point of the centuries, that she discharges her duty is infinitely more important than what happens next.
When the King's men bring somebody to the edge of the lake, should he or she be the one appointed by fate to bring down all usurpers and sit regal on the throne of England, the Lady _must_ raise Excalibur over the tranquil waters, proof and weapon of righteous royal blood.
The soldiers do as they must as well, and when they are done they bury the body next to the others.