I edited my post before you replied. So part of the answer is in there ;)
Basically it is like that. When you pull a cord out of a console a part of the plug can still have contact while the other one already lost it.
(remember the Pokemon Gameboy "cloning"? Where when only 50% of the link cable contacts had contact with the Gameboy it would not send info to one of the 2 Gameboys?)
A power cord also has several prongs/contacts.
When you pull it out of the console the e.g ground prong can lose contact but the other ones could still have contact.
Since electricity can travel short distances by air it can result in a ghostbusters (DO NOT CROSS THE STREAMS) effect.
On consumer electronics the "device end" of of a cable is also less safe than the "wall end" (wall end has thicker plugs and more secure connection etc).
Plus when you pull the plug out of the wall the electricity traveling through it can somewhat stabilize before it reaches your device.
Its not 100% scientifically correct but thats basically what happens ;)








