Why do Giraffes have Such Long Necks?

Many people think that the giraffe has a long neck so it can reach to the very top of the trees where other animals can not feed so they will always have food. But scientists feel that the purpose of their neck is for fighting with other giraffes during mating.