|MLA Citation:||Bloomfield, Louis A. "Question 1551: How can an ant survive inside a microwave oven?"|
How Everything Works 20 May 2018. 20 May 2018 <http://howeverythingworks.org/print1.php?QNum=1551>.
Metals are good conductors of electricity and effectively "short out" any electric fields that are parallel to their surfaces. Microwaves reflect from the metal walls because those walls force the electric fields of the microwaves to cancel parallel to their surfaces and that necessitates a reflected wave to cancel the incident wave. Because of that cancellation at the conducting surfaces, the intensity of the microwaves at the walls is zero or very close to zero.
The ant survived by staying within a tiny fraction of the microwave wavelength (about 12.4 cm) of the metal surfaces, where there is almost zero microwave intensity. Had the ant ventured out onto your cup, it would have walked into real trouble. Once exposed to the full intensity of the microwaves, it would not have fared so well.