We study through a reaction-diffusion algorithm the influence of landscape diversity on the efficiency of search dynamics. Remarkably, the identical optimal search strategy arises in a wide variety of environments, provided the target density is sparse and the searchers information is restricted to its close vicinity. Our results strongly impact the current debate on the emergentist vs. evolutionary origins of animal foraging. The inherent character of the optimal solution (i.e., independent on the landscape for the broad scenarios assumed here) suggests an interpretation favoring the evolutionary view, as originally implied by the Lévy flight foraging hypothesis. The latter states that, under conditions of scarcity of information and sparse resources, some organisms must have evolved to exploit optimal strategies characterized by heavy-tailed truncated power-law distributions of move lengths. These results strongly suggest that Lévy strategies-and hence the selection pressure for the relevant adaptations-are robust with respect to large changes in habitat. In contrast, the usual emergentist explanation seems not able to explain how very similar Lévy walks can emerge from all the distinct non-Lévy foraging strategies that are needed for the observed large variety of specific environments. We also report that deviations from Lévy can take place in plentiful ecosystems, where locomotion truncation is very frequent due to high encounter rates. So, in this case normal diffusion strategies-performing as effectively as the optimal one-can naturally emerge from Lévy. Our results constitute the strongest theoretical evidence to date supporting the evolutionary origins of experimentally observed Lévy walks.