I will say in their defense that some people delete their comments/posts not because they care about "karma" but because they now feel they were wrong and are genuinely embarrassed or think that its continued presence is just an annoyance to other people.
That said, imo, unless you realize you've broken a rule in posting it or literally just posted by accident, it's healthier for yourself and the community to simply e.g. edit in a correction and a "mea culpa", even if you continue to get dogpiled for it.