Accident is the red-headed stepchild of invention. Several “inventions” happened when someone made a “mistake”, but checked the result before tossing it. Acknowledging the accident is sometimes problematic (see first example below).
There are several stories about how ganache, the French chocolate confection was invented. Wikipedia claims it was invented by a playwright turned confectioner, Paul Siraudin. He claimed to have named it after a popular vaudeville comedy of the day, Les Ganaches (“The Chumps”). Other stories claim it was a mistake by an apprentice cook who was called “ganache” (idiot) by his teacher. The result overshadows the original use of the word in Web searches.
The British blues guitarist, Peter Green did some repair work on his guitar and put back in one of the pickups backward. The resulting “snarky” tone was a unique part of his sound.
Closer to home, several accidents and acts of desperation have lead to better tasting coffee and espresso. Normally, brewed coffee is ground coarser than for espresso. I forgot to reset the grind coarseness when switching from making espresso to making brewed coffee (in a Clever Coffee Dripper). I like the result better and continue to make my brewed coffee that way, six months later.
During the Snowpocalyse in Texas, February 2021, we ran out of white sugar. We still had light brown sugar so I tried it in our brewed coffee and espresso drinks. We like it better and continue to use light brown sugar in both espresso and brewed coffee. This is a midway between accident and necessity.