It's my understanding that the girl was not supposed to say "Cookie Monster" when that sketch was being taped. Yet they ad-libbed through it, and it's since become one of the most fondly remembered pieces.
I know of one other Sesame Street sketch in which a mistake was supposedly made, and they decided to keep it in for unique dramatic effect. It was the Grover the Waiter skit in which Fat Blue ordered a bowl of hot alphabet soup, and made sure that it indeed had the entire English alphabet. Twice he had to call Grover back to get missing letters from the kitchen (which I might add were rather large, about 2 inches high. Most alphabet soups I've eaten have letters about 1/8th that tall.) As he came to the letter "Y"... (best as I can recall):
FAT BLUE: "U, V, W, X, Y... Uh, Waiter!!"
GROVER: (runs up) "Yessir!"
FAT BLUE: "There is no 'Y' in my soup. Oops, I was wrong. There is a 'Y'"
GROVER: (glancing in bowl) "I see the 'Y' there..."
FAT BLUE: "It's the 'Z'. I can't eat this soup without a 'Z'"
My understanding that getting the Y and Z mixed up was an actual mistake on the part of the Muppeteer.
There are other places in the arts where mistakes turned out to be a good thing. Like Billy Joel in "You're Only Human" (S...sss.sometimes that's what it takes) or The Mamas and the Papas in "I saw her again" (I saw her..[oops, started too early].. I saw her again last night). Do we see less of that today because of technology making it too easy to correct things?