The 2.4 GHz frequency was unlicensed spectrum because it couldn't be used for other purposes (due to the interference). Wifi originally used this part of the spectrum because it was unlicensed.
There's a direct causal relationship between the interference being "considered acceptable" and your wifi both existing and being janky when the oven's on. It's also why garage door openers are (were?) on that frequency.
If your microwave is causing interference with your WiFi, it could be faulty and leaking EMR and if so, should probably be replaced as soon as possible!
I have never had problems with my (Panasonic) device over its ~20Y life with any WiFi routers, all of which have been within a couple of metres of my microwave oven.
- Why did the inventors of Wi-Fi decide to use unlicensed spectrum?
- Why, now that Wi-Fi has become widespread, has that spectrum not become regulated?
- Why are microwave ovens, specifically, not required to have extra shielding?
I suspect it is the glass door with the metal screen full of holes sandwiched in the middle. This should block waves of a particular frequency but the cheap magnetron inside is undoubtedly less than perfect and generates lots of stuff that will pass through it.