Mutations, though necessary for evolution, are general harmful. Jerry Coyne points out that there's an irony here:
The irony to which I refer in the title is that natural selection would in principle—and has in practice—actually tried to reduce the frequency of mutations to zero. But if this process were perfectly successful, natural selection would put itself out of business by totally eliminating the creation of genetic variation. We know that selection has “tried” to do this, for all the intricate mechanisms for repairing DNA damage, and excising new mutations, are products of natural selection. Those mechanisms operate not only in the “somatic” cells of the body, but also in the cells that ultimately produce sperm and eggs.So natural selection acts on the DNA-repair level to put itself out of business. Why hasn’t it? Why are organisms still evolving? I see only four answers, one more likely than the other three.The most probable explanation is that evolution does not produce perfect adaptations. In the case of mutations, though natural selection favors individuals most able to repair any changes in DNA (although a small percentage of these might be adaptive), this level of perfection cannot be achieved because of constraints: the cost of achieving perfection, the fact that all errors are impossible to detect or remove, or that some cells (i.e., sperm or eggs) may not even have DNA-repair mechanisms because of genetic or physiological constraints.