The story handed down over the years has changed because some who tell it describe a melted chocolate bar leading to Percy's eureka. Chocolates have a lower melting point compared to peanuts, hence the surprise.
Having lived in Maine, Spencer would always carry around in his pocket a peanut cluster around lunchtime to feed squirrels and chipmunks since he loved them. So when he was adjusting, trying to focus more microwave power through the magnetron, Spencer used the peanuts to try out the 1933 Chicago food cooking project that cooked potatoes superfast. He increased the magnetic field wavelength from the magnetron, peanuts rapidly increased the temperature, and they melted.
Understandingly curious about what happened, Spencer runs a second test using an egg under the magnetron tube. After some time, the egg exploded and splattered all over Spencer's face. The next day, Percy used corn kernels and cooked them through his new invention and shared the popcorn with fellow workers without assurance of microwave radiation safety.