The origin of the microwave oven is directly linked to a melted chocolate bar in someone’s pocket.
A section of a cavity magnetron from "Pingu Is Sumerian"
In 1945, engineer Percy Spencer was researching radar technology at the Raytheon Corporation in Waltham, Massachusetts. Spencer was monitoring equipment that included a magnetron, a device that can generate higher-energy radio waves, or today what we call microwaves. At the time, engineers realized that with these microwaves the wavelengths were short enough that they could be reflected and focused off an antenna that fit into the nose of an airplane – potentially very helpful for fighter plans in World War WWII.
What people didn’t know back at that time was that these same microwaves could agitate water molecules, which, among things, could heat the food they were found in. Spencer discovered this property of microwaves by accident when the chocolate bar in his pocket began to melt after standing in front of the magnetron for a while. Intrigued, Spencer then placed other food like popcorn and eggs to see if they too would heat up and cook when placed in front of the microwave-generating magnetron. It would take a couple of decades for magnetrons to become cheap and small enough to fit inside an everyday kitchen appliance. But it’s safe to say it was this lucky accident by Spencer that has made countless meals a lot easier for many people.
(* Footnote to Percy Spencer’s story: In addition to his discovery of the uses of microwaves for cooking, Spencer oversaw thousands of employees at Raytheon, was an expert in radar tube design, and was awarded 300 patents over his career. He was a largely self-taught person from an impoverished upbringing who never finished middle school.)