Written by Alyson Krueger from Businessinsider.com:
"It is hard to imagine how certain products were invented. How did someone think of the slinky, and silly putty, and potato chips?
It turns out many of society's most well-known inventions were simply mistakes made by scientists on alternative quests.
The slinky
Inventor: Richard Jones, a naval engineer
What he was trying to make: A meter designed to monitor power on naval battleships
How it was created: Jones was working with tension springs when one of them fell to the ground. The spring kept bouncing from place to place after it hit the ground, and the slinky was born.
Penicillin
Inventor: Sir Alexander Fleming, a scientist
What he was trying to make: Ironically, Fleming was searching for a "wonder drug" that could cure diseases. However, it wasn't until Fleming threw away his experiments that he found what he was looking for.
How it was created: Fleming noticed that a contaminated Petri dish he had discarded contained a mold that was dissolving all the bacteria around it. When he grew the mold by itself, he learned that it contained a powerful antibiotic, penicillin.
Chocolate-chip cookies
Inventor: Ruth Wakefield, Owner of the Toll House Inn
What she was trying to make: Regular chocolate cookies
How it was created: While mixing a batch of cookies, Wakefield discovered she was out of baker's chocolate. As a substitute she broke sweetened chocolate into small pieces and added them to the cookie dough. She expected the chocolate to melt, making chocolate cookies, but the little bits stuck.
Potato chips
Inventor: George Crum, a chef at the Carey Moon Lake House in Saratoga Springs
What they were trying to make: A plate of fried potato
How it was created: One day a customer sent back his plate of potatoes many times and kept asking for them to be more fried and thinner. Crum lost his temper, sliced the potatoes insanely thin and fried them until they were hard as a rock. To the chef's surprise, the customer loved them and wanted more!
The Pacemaker
Inventor: John Hopps, an electrical engineer
What he was trying to make: Hopps was conducting research on hypothermia and was trying to use radio frequency heating to restore body temperature.
How it was created: During his experiment he realized if a heart stopped beating due to cooling, it could be started again by artificial stimulation. This realization led to the pacemaker.
Silly Putty
Inventor: James Wright, an engineer at General Electric
What he was trying to make: During World War II, The United States Government needed rubber airplane tires, boots for soldiers, etc. Wright was trying to make a rubber substitute out of silicon, since it was a widely available material.
How it was created: During a test on silicon oil, Wright added boric acid to the substance. The result was a gooey mess that bounced. Although no one could find any real use for it, it became a fun toy!
Microwave ovens
Inventor: Percy Spencer, an engineer with the Raytheon Corporation
What he was trying to make: The engineer was conducting a radar-related research project with a new vacuum tube
How it was created: Spencer realized that the candy bar in his pocket began to melt during his experiments. He then put popcorn into the machine, and when it started to pop, he knew he had a revolutionary device on his hands.
Saccharin (an artificial sweetener)
Inventor: Constantine Fahlberg, a researcher at Johns Hopkins University
What he was trying to make: Fahlberg was investigating the oxidation of o-toluenesulfonamide, whatever that means!
How it was created: Fahlberg's discovery happened because he forgot to wash his hands. He had spilled a chemical on his hands in the lab that caused his bread to taste very sweet. The researcher immediately requested a patent and mass-produced his product.
Fireworks
Inventor: An unknown cook in China
What he was trying to make: According to legend, the cook was simply experimenting in the kitchen.
How it was created: A cook accidentally mixed together charcoal, sulfur, and saltpeter - common kitchen items 2000 years ago. When the mixture was compressed in a bamboo tube (why the cook did that we have no idea), it exploded.
Scotchgard
Inventor: Patsy Sherman, a chemist for 3M
What she was trying to make: Sherman was assigned to work on a project to develop a rubber material that would not deteriorate from exposure to jet aircraft fuels.
How it was created: She accidentally dropped the mixture she was experimenting with on her shoe. While the while the rest of her shoe became dirty and stained, one spot remained bright and clean. She retraced her steps and identified the stain resistant compound, known today as scotchguard.
Corn Flakes
Inventor: The Kellogg brothers, John and Will
What they were trying to make: A pot of boiled grain
How it was created: The brothers accidentally left a pot of boiled grain on the stove for several days. The mixture turned moldy but the product that emerged was dry and thick. Through experimentation they eliminated the mold part and created corn flakes.
LSD as a drug
Inventor: Albert Hofmann, a chemist
What he was trying to make: He was researching lysergic acid derivatives in a laboratory in Basel, Switzerland
How it was created: Hofmann unintentionally swallowed a small amount of LSD while researching its properties and had the first acid trip in history.
Ink-Jet printers
Inventor: A Canon engineer
How it was created: After resting his hot iron on his pen by accident, ink was ejected from the pens point a few moments later. This principle led to the creation of the inkjet printer.
Post-it notes
Inventor: Spencer Silver, a researcher in 3M Laboratories
What he was trying to make: A strong adhesive
How it was created: While working away, Silver created an adhesive that was actually weaker than what already existed. It stuck to objects but could be pulled off easily without leaving a mark. Years later a colleague spread the substance on little pieces of paper to mark his place in his choir hymn book, and the idea was born.
X-Rays
Inventor: Wilhem Roentgen, an eccentric physicist
What he was trying to make: He was interested in investigating the properties of cathodic ray tubes.
How it was created: When shining light through the tubes he noted fluorescent papers in his lab were illuminated even though his machine had an opaque cover."

Of these, I only knew about penicillin - some of these were really surprising (like the microwave and silly putty). As Edison said - Just because something doesn't do what you planned it to do doesn't mean it's useless.