When you put metal objects in the microwave, they function as an antenna, conducting electricity. Since most microwaves are putting out around 800–1500w, that’s a lot of electricity to put into a piece of foil (or a fork). The upshot of this, is that if you can ground the antenna, that will drain the current out of the metal, which is the purpose of the sheilding around the microwave oven’s cavity. The door with the little holes in it, is also a shield, with the little holes letting light, but not microwaves, out.