Because there was a mutation in the gazelle's genetic code. It will be nice for the gazelle to run faster, but since the gazelle was born with longer legs, we know it's just a random mutation. The gazelle's parents have little to do with it, and the nutrition of the food it eats after it's born is irrelevant to how long its legs are at birth.