Not every behavior has an evolutionary advantage.
If anything, "evolution" filters out disadvantages (eg: can't survive because your neck's too short and that pesky giraffe is eating all the leaves you could reach).
Evolution kills what doesn't work.