There is plenty of evidence that being able to behave variably, that is, independent of the environment, confers an organism with highly adaptive autonomy for a large number of highly evolutionarily relevant tasks.
I have summmarized some of the most well-documented examples in animals here:
https://doi.org/10.1016/j.bbrc.2020.12.011