Why outlets spark when unplugging - EMF & Inductors

the collapsing magnetic field induces current and voltage back into the circuit, you showed this with the shake weight. its also how a a/c transformer works, because the voltage oscillates it induces a magnetic field that then collapses 60 times a second ( in USA anyway) in Europe it would be 50 times a second