system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why does the light on chargers remain lit for a couple seconds after it has been unplugged?
gpt
Capacitors. The charger contains capacitors, which you can think of as being a bit like batteries (they're different in important ways, but the point is they store electrical energy). It uses them for things like smoothing over any irregularities in the mains power supply.

When you disconnect mains power, the capacitors are still charged, and the status light runs on that charge. Eventually it uses it up, and the light fades out.

Try turning off the charger while a device is still connected, as though to charge: you'll see that the light goes out much faster because the stored energy has somewhere to go beyond keeping the little light on.