Variation exists in the Giraffe species, some giraffes in this environment have long necks and others have short necks(shown with black spots).
These mix of giraffes have produced more babies than this environment can support. Not all of the giraffes are fit to survive here.
The short necked giraffe can not reach the tall trees to get leaves to eat. The tall neck giraffes can reach the tall trees and will not die of starvation
The giraffes with larger necks have a higher chance of survival due to being able to eat the trees and get their food. Over generations the giraffe population will have the trait of longer necks more commonly.