Its due to the microwave ‘design’ flaw of having cold and hot areas. As is the gap under the glass plate were cockroaches hide (ugh) ---from the newscientist.
http://www.newscientist.com/lastword/article.jsp?id=lw594
Questions & answers on everyday scientific phenomena
Them!
Question
I have been amazed to see ants emerge seemingly unharmed after being zapped in the microwave, usually after hitching a ride on my coffee cup. They seem to run around quite happily while the microwave is in operation. How can they survive this onslaught?
Judith Kelly , Darwin, Northern Territory
The phenomenon that the ants take advantage of is that microwaves form standing waves within the oven cavity.
So in some places in the oven space, the energy density is very high, whereas in others it is very low. This is why most ovens have turntables to ensure that cooking food is heated evenly throughout.
This standing wave pattern can be observed by putting a static tray of marshmallows in the microwave, and heating for a while. The result will be a pattern of cooked and uncooked marshmallows. The standing wave pattern, however, varies according to the properties and position of any material within the oven, such as a cup of water.
The ant will experience this pattern as hot or cold regions within the oven and can thus locate the low-energy volumes. If the ant is in a high-field region, its high surface area to volume ratio allows it to cool down more quickly than a larger object while it searches for a cold spot.
It is a common myth that microwaves are too big to heat small objects. The fallacy of this has been demonstrated by chemists such as myself who employ microwave heating in their work. Certain types of catalyst consist of microwave-absorbing particles--typically of submicron size--dispersed throughout an inert support material. There is convincing evidence that microwaves are capable of heating only the tiny catalyst particles.
A. G. Whittaker , Heriot Borders
There is very little microwave energy near the metallic floor or walls of the oven. The electromagnetic fields of microwaves are "shorted" by the conducting metal, just as the amplitudes of waves in a skipping rope, swung by a child at one end but tied to a post at the other, are reduced to nothing at the post.
An ant crawling on the rope could ride out the motion near the post, but might be thrown off nearer the middle.
For a quick demonstration of this, place two pats of butter in a microwave in two polystyrene coffee cup bottoms, one resting on the floor, the other raised on an inverted glass tumbler. Be sure to place a cup of water in the microwave as well. On heating, the raised butter will melt long before the butter on the floor.
Charles Sawyer , Camptonville California