I'm with you, sjbrot, that generally annoys the hell out of me. Encores should be spontaneous, but in nearly all shows I've seen, it all just happens because the general sentiment of both bands and audience is that "that's the way it has to be done". Lame. Is it the audience's fault, for yelling "we want more!"? Is it the band's fault for trying too hard to end their set in a "memorable" way?
I don't know, but if there's going to be an encore, the least a band can do is to not fool the audience with the whole "hey look, the stage lights are out, we're off-stage, so see you later, we're gone!... Or are we?" charade. We know you're not gone, you left your instruments plugged in onstage, for fuck's sake, your roadies aren't moving in to clean up. You're only drinking a beer, and chatting about how it went so far, and wondering if the audience is still dumb enough to know that it's an illusion, even after all those shows they've seen. So very lame.
That said, I suppose there can be good encores, but they are very rare. I've never seen any. Maybe it's not the greatest reference, but Blink 182's Tom, Mark & Travis Show (their live album) was a good, straightforward effort in the matter: at least they said their "encore" is just a fake.
(Yes, I have that album. Shoot me.)