Why do giraffes have such long legs? Animal simulations reveal a surprising answer