The loop comes into play when you call `wait_for_element_visible`. In that case, if a stale element is found by `is_element_visible` it will return False and the loop will try again.