I like walrii's answer better than mine
Back in the dark ages when I sold the silly things, I was told by a technician that the cooking chamber was a 'tuned' space to increase the efficiency of energy transfer from the magnetron to food in the cooking chamber. The cooking frequency was supposed to be close to the resonant frequency of the water molecules in the food. This was an Amana tech back in Iowa. My experience was that this might have been true for Amana branded ovens, but other cheaper, less well engineered brands, maybe not so much.
The story ran: A GE tech was tuning some radar gear tuned to 970 (980??) mhtz. He had a candy bar in is shirt pocket in preparation
for his break. When he leaned over the unshielded, powered up rig the bar promptly melted. Voila! Microwave Cooking. This frequency transferred maximum energy to fats. Later they changed to 2450 mhtz.
Bob