so by the late twentieth century , we have a theory of natural selection which says that mutations arise spontaneously in genes , that the environment favors the mutations that are beneficial , and out of this selection process evolution occurs .