Variations can be beneficial or harmful according to the ecological niche of the organism. A variation suitable for the particular niche is selected by nature during evolution. Thus, variations are necessary for the survival of the species. Variation is also important for the evolution of species.
For example, a population of heat-resistant bacteria can survive in the high temperature of the water, but if the temperature of water increases by global warming then most of the bacteria would die.