The most important unanswered question in evoltionary biology is arguably “from where does evolution get its’ power?”
The truth is that many mutations occur and the rare beneficial mutations stick around, but this is not compelling. It also doesn’t explain why a shrew would evolve into a bat, developing extended bones and membranes from the hands which became wings. The mystery is how mutations alter the morphology of an animal such that it takes on a different ecological role.
Bret theorises that this is explained by explorer modes; these are mechanisms through which an evolved clade (set of creatures) explore design space to allow for the discovery of opportunities that could not occur by accident.
An animal that makes the supposed “mistake” of returning to a new habitat than that from which it came risks likely death, but there is also a small possibility that it may make a population-changing discovery and in the long run this “flaw” would be a beneficial trait for an animal to have.