I don't think you understand how it works. It's not about animals adapting to survive, but the survival of those best equipped. Not everything survives.
Imagine there's a life and death surprise test on evolution. Demonstrate knowledge and you live. Fail to do so and you die. Part of the population already has a reasonable understanding of it. Others don't. You're looking at it from the perspective of the less knowledgeable cramming their study to pass the test. Evolution in this contrived case can select for those who already happen to understand the topic.