So, how could these “favorable variations” occur? Darwin tried to answer this question from the standpoint of the primitive understanding of science at that time. According to the French biologist Chevalier de Lamarck (1744-1829), who lived before Darwin, living creatures passed on the traits they acquired during their lifetime to the next generation. He asserted that these traits, which accumulated from one generation to another, caused new species to be formed. For instance, he claimed that giraffes evolved from antelopes; as they struggled to eat the leaves of high trees, their necks were extended from generation to generation.
Darwin also gave similar examples. In his book The Origin of Species, for instance, he said that some bears going into water to find food transformed themselves into whales over time. (SOURCE)
However, the laws of inheritance discovered by Gregor Mendel (1822-84) and verified by the science of genetics, which flourished in the twentieth century, utterly demolished the legend that acquired traits were passed on to subsequent generations. Thus, natural selection was left ‘alone’ and consequently rendered completely ineffective as an evolutionary mechanism.