I am not an expert on wild life however to my knowledge giraffes eat the leaves off of trees. So with that said, since leaves are their food source and they are higher in the air, the giraffes need the long necks in order to reach their food source. Tree branches are out of reach for a lot of animals but not for the giraffe, but if the giraffe had an average size neck... the leaves would be out of reach (making them lose their primary source of food).
Hope this helps. :)