Individuals in a population vary. When some differences are heritable and influence how successfully individuals leave offspring, those differences can become more or less common over generations. This is natural selection.
The population changes; an individual does not acquire a useful inherited trait simply because it needs one. What is advantageous also depends on the environment. A feature that helps in one setting may be costly in another, so evolution has no fixed destination of becoming “better” in every respect.