The distribution of the effects of mutations

And what is getting selected to optimize the genome, if not mutations?