The giraffe example is largely bogus, and Lamarckian theories of the transmission of acquired traits has been pretty well thrown out of court.
Yes, it's been thrown out of court, long since, but the point is that, while not taken seriously by almost anyone today, it was at one time. And that was the point I tried to make, that to say "the theory of evolution" is not meaningful. Lamarck is only one of the various theories that have been put forward. One should refer to "Darwinian theory of evolution".