An emotion that doesn't correlate with reality is itself a bug. Sure, it may not be easy to fix (or even possible without brain-hacking), but it's a bug in the human source code nonetheless.
To extend the analogy, it's like a bug in the operating system. If that low-level bug causes a higher-level program to malfunction, you can still blame "buggy code" even if the higher-level program itself is bug-free.
An emotion that doesn't correlate with reality is itself a bug.
Even if it's advantageous to the agent's goals (not evolutionary fitness)? Emotions don't have XML tags that say "this should map to reality in the following way".
Razib summarized my entire cognitive biases talk at the Singularity Summit 2009 as saying: "Most people are stupid."
Hey! That's a bit unfair. I never said during my talk that most people are stupid. In fact, I was very careful not to say, at any point, that people are stupid, because that's explicitly not what I believe.
I don't think that people who believe in single-world quantum mechanics are stupid. John von Neumann believed in a collapse postulate.
I don't think that philosophers who believe in the "possibility" of zombies are stupid. David Chalmers believes in zombies.
I don't even think that theists are stupid. Robert Aumann believes in Orthodox Judaism.
And in the closing sentence of my talk on cognitive biases and existential risk, I did not say that humanity was devoting more resources to football than existential risk prevention because we were stupid.
There's an old joke that runs as follows:
A motorist is driving past a mental hospital when he gets a flat tire.
He goes out to change the tire, and sees that one of the patients is watching him through the fence.
Nervous, trying to work quickly, he jacks up the car, takes off the wheel, puts the lugnuts into the hubcap -
And steps on the hubcap, sending the lugnuts clattering into a storm drain.
The mental patient is still watching him through the fence.
The motorist desperately looks into the storm drain, but the lugnuts are gone.
The patient is still watching.
The motorist paces back and forth, trying to think of what to do -
And the patient says,
"Take one lugnut off each of the other tires, and you'll have three lugnuts on each."
"That's brilliant!" says the motorist. "What's someone like you doing in an asylum?"
"I'm here because I'm crazy," says the patient, "not because I'm stupid."