What led to the invention of the microwave oven?

Shortly after WWII research was being done on uses for radar. While doing research a scientist discovered that a chocolate bar in his pocket melted. They then started trying other item and thus discovered that microwaves heated items. The first commercial microwave oven came out in 1949.