This question already has an answer here:
Why would someone delete a post with a score of 3 or more?
Sometimes, you write an answer that at first looks good. Other users see it and upvote it.
But then you get a sudden surge of wisdom. The answer is wrong, maybe even harmful.
So now you are on the crossroad:
If you choose the first option, you did the right thing. And the system rewards you with a badge.
I have deleted a couple of answers with a score of three or more because they were wrong (yes, I'm not infallible), and I couldn't fix them without completely changing the answer, so the contents people voted on would vanish and the answer would then duplicate another existing answer; or, in one case, I didn't know the right answer after realising that the initial answer was wrong.
Instead of having a wrong answer staying around, I prefer deleting them. Having a badge as consolation for the first time is nice.