If evolution caused X, all that it means is that historically, under specific circumstances, the animals with X had a higher chance of reproduction.
Even that is only true for a narrow reading of the sentence.
It is merely better than nothing, or better than the previous version
That's where it stops being true. Genetic drift is part of evolution and can lead to worse versions.
I am a newbie so today I read the article by Eliezer Yudkowski "Your Strength As A Rationalist" which helped me understand the focus of LessWrong, but I respectfully disagreed with a line that is written in the last paragraph:
So this was my comment in the article's comment section which I bring here for discussion:
Edit 1: I realize there is change in the environment and that may make some of our cognitive biases, which were useful in the past, to be obsolete. If the word "flaw" is also applicable to describe something that is obsolete then I was wrong above. If not, I prefer the word obsolete to characterize cognitive biases that are no longer functional for our preservation.