Accidental, unplanned breakthroughs in physics There is possibly some idiom or saying like this, "If you try too hard for something, you will never get it. If you do not aim for something, it may fall on you accidentally, not as you originally planned."
In physics, or generally in science, there are many moments where success and triumph come from the accidental, unplanned attempts. Moreover, there are some cases that originally were attempts for one specific question or a goal, but solved another seemingly unrelated problem, or reach seemingly opposite goals. There are these kinds of moments leading to a breakthrough of physics or science.
For example, 


*

*Yang-Mills theory: The original paper has attempted to explain a theory of nucleons, such as neutron and proton interactions with isospin symmetry, but it turns out that Yang-Mills theory as a non-Abelian gauge theory is suitable to describe a more fundamental subject, the gauge fields coupled to quarks and leptons in the standard model (EM, and especially the weak interaction and the strong interaction.)

*$Z_2$ topological insulator in 2+1D: the original paper of quantum spin hall effect from Kane and Mele is about graphene. But it turns out that the phenomenon is not present in graphene (C Kane jokes on this accident himself), but the physics is profound and correct, and later realized in CdTe/HgTe/CdTe quantum wells with a 2D film HgTe sandwiched.
[Question]: Can any of the readers here list more? Both in theory or in experiments. Making an inspiring list for eager-minded scientists at Phys.SE here. To give us some inspiration and high motivations to be subconsciously aware of those random accidental moments.
 A: A few more here:
Fractional quantum hall effects: had heard that the large magnetic field is originally aimed to see the Wigner crystal effect, instead of testing quantum hall physics.
Asymptotic freedom (QCD running couplings to small at high energy): from Wilczek's book ``Longing for the Harmonies,'' at that time David Gross originally aimed to prove that QFT cannot explain the Bjorken scaling, i.e. prove that (non-Abelian) QFT always lead to large coupling at high energy, simply that QFT cannot explain the couplings run to small at high energy. But the final result is the opposite. And they won the Nobel Prize.
String theory: originally aimed for explaining strong interaction, but not as successful as QCD. String had then been abandoned for a long while. Later string theory turned out to be a candidate for a theory of everything.
Inflation(cosmology): Alan Guth firstly studied particle physics and magnetic monopole in grand unified theory(GUT). He encountered the magnetic monopole problem (the sparsity of magnetic monopoles in the universe). Initially there is no significant progress. But he and colleagues turned out to detour to use a theory of supercooling to understand the phase transition of the early universe, which produces a false vacuum then decay to produces Inflation. This new idea discovery of Inflation goes backward solving the magnetic monopole problem.
The non-existence of luminiferous ether: Michelson and Morley  had initially hypothesised that luminiferous ether exists, but they ended up showing otherwise.     
A: The Stern-Gerlach Experiment: originally setting out to corroborate the Bohr-Sommerfield hypothesis that the direction of the angular momentum of an atom is quantized, it was eventually realized that the proper interpretation of the observations was as the first evidence of particle spin and that the electron is a spin-1/2 particle.
The Spin-Statistics Theorem: I can't imagine anyone expected this jewel to pop out of the union of quantum mechanics with special relativity. 
A: Discovery of X-rays: it happened when Röngten discovered that some photographic plates received radiation even if they were unexposed.
