Well, sometimes mistakes in science end up creating something unexpected.
Charles Goodyear accidentally spilled a rubber/sulfur compound he was working with on a hot stove. The rubber got harder and stronger. By accident he discovered vulcanization.
Teflon was discovered accidentally by Dr. Roy Plunkett who was testing different halogenated hydrocarbons. They had a bunch of compressed gas cylinders full of test gases, and when they came back the next morning they discovered one cylinder measured 0 psi. But when the weighed it on a scale, it was the same as the rest of the cylinders. When they opened up the cylinder, a fine white powder poured out. The gas has somehow spontaneously polymerized, forming a crude plastic that became known as Teflon.
Gunpowder was discovered by the ancient Chinese while trying to make an elixer that would give eternal life! They mixed honey, sulfur, and potassium nitrate in a pot while slowly heating it. Once all the water evaporated, the mixture caught fire, and burned down the hut they were working in.