It's impossible to say, really. Yes, some kind of approximation in rational thinking is necessary for building a practical brain. But it's also a fallacy to think evolution created the perfect thinking machine that is optimally fit, even for its environment. Our brains are obviously suboptimal in many areas (and in my personal opinion are deeply and horrifyingly suboptimal in most areas). It's hard to say, though, whether something is a feature or a bug without examining the neural circuitry behind them in detail.
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.