Why Can You Watch Food Through a Microwave Door?
A microwave oven door contains a window, yet the energy heating the food does not pass through it in any dangerous amount. The dark mesh covering the glass performs a carefully scaled filtering trick.
Microwave ovens produce electromagnetic waves with wavelengths of roughly twelve centimeters. Visible light is also electromagnetic radiation, but its wavelengths are less than one thousandth of a millimeter.
The metal screen contains holes large enough for visible light to pass through. That allows a person to see the illuminated interior. However, the openings are extremely small compared with the microwave wavelength.
Electric currents induced in the metal reflect the microwave energy back into the oven. The holes are too small for those long waves to travel through efficiently. The screen therefore behaves almost like a solid metal wall to microwaves while appearing partially transparent to human eyes.
The solid metal chamber, door seals, and safety switches complete the enclosure. Opening the door interrupts power to the microwave generator, preventing normal operation while the cooking chamber is exposed.
Some energy can leak from any real enclosure, but ovens are designed and regulated so that leakage remains below established safety limits. A damaged door, seal, hinge, or latch should still be examined rather than ignored.
The mesh is an example of an object behaving differently depending on the scale of the wave meeting it. To visible light, the door contains thousands of open windows. To the much larger microwaves, the same pattern presents a nearly continuous metal barrier.
You can watch dinner rotate because the door separates two kinds of electromagnetic radiation according to their wavelengths.
Source: Microwave Oven Radiation, United States Food and Drug Administration - Microwave Oven Safety, World Health Organization

Varanasi, India as seen from Ganga River
Source: By Marcin Białek