Here's a scenario for you to consider.
There are 100,000 turtles. Some of them contain a mutation that is sensitive to this chemical and feel mild pleasure when near it. So they follow it. Say this is 100 of the turtles.
So 100 follow the chemical scent that leads them to Easter island. The other 99,900 stay where they are all year.
Now, a shark population outgrows its range nearby the old grounds and moves into where the 99,900 turtles are, eating many of them, stressing the rest, devastating the population.
But the ones that went to Easter Island are out of range. They survive and multiply because each year when the sharks are pressured to range further for food, the Easter Island mutants are "out of town".
After several millenia, the Easter Island turtles continue to thrive, and the old location population becomes extinct (or, possibly, a mutation that yields a different, harder to eat shell survives better there, making them very different from the old Easter Island variety).
Basically, a mutation occurs that confers some survival advantage. The ones who have it happen to survive and multiply, the mutation becomes widespread and perhaps ultimately it becomes a defining feature.
Evolution doesn't care. It is an effect, not a cause. Changes happen in the genome through mutation or mating selection or interbreeding. And the ones that turn out to be useful provide animals with an improved ability to make more of it.
That's simplified, but you seem to be asking for simplified; and I am really answering for others reading who are actually interested in the answer.
Evolution has no plan. It's what happens when external forces pressure a population. The best suited tend to do the best. They aren't trying to, they just ended up that way. No one ever talks about the 99,900 turtles that got eaten by sharks because they didn't have a yen for statues (that's a joke), but they we right there doing their thing, laughing at the islanders for their weird quirk, right up to the moment they got munched while the islanders were off doing their inexplicable walkabout.