The migration's movements are dictated by food sources and rainfall. Zebras eat long grasses, while wildebeests follow to eat fresh shoots. Zebras also have good memories, which helps them remember safe migration routes and guide the wildebeests. Wildebeests have a strong sense of smell that can detect water even in dry conditions, which is also helpful for the zebras.
Ian