It's because if we think scientifically the neck may have more thyroxine 
or naturally god has made a diversity in the animals and in it he has made one unlike to other
Originally,giraffe did not have a long neck. It had a very short neck and thus was unable to eat leaves from trees,since it's a herbivore. But then,just like the evolution of man, the giraffe also evolved and eventually began to grow a long neck and eat from big trees.
Charles Darwin was the first person to give the concept of evolution.
I hope I am able to help.