The giraffe's neck supposedly supplies a crucial example for preferring natural selection over Lamarckism as a cause of evolution. But Darwin himself (however wrongly by later judgement) did not deny the Lamarckian principle of inheritance for characters acquired by use or lost by disuse. He regarded the Lamarckian mechanism as weak, infrequent, and entirely subsidiary to natural selection, but he accepted the validity of evolution by use and disuse. Darwin does speculate about the adaptive advantage of giraffe's necks, but he cites both natural selection and Lamarckism as probable causes of elongation.
"The Tallest Tale", p. 312 - Leonardo's Mountain of Clams and the Diet of Worms (1998)