Not just evolved...
The brain is the mother of emergence; these things evolve, in parallel in each of us.
So, in a way, they must be the result of an optimization... but we know what optimization isn't the end-all be-all. Sometimes the less optimal road is the only one leading to success. Deductive thought is less fast than going by rote and/or intuition, original creativity even less so.
But some situations are dead ends without the Big Guns, slow as they are.
But what I also meant is, that we can train ourselves to "feel" the part of the mind which accepts the bias. Awareness can tip us off when we're pulling a fast one on ourselves. Bit after bit.