Yes, it's creepy. But only because
you don't know anything about how electronic devices work.
"Any sufficiently advanced technology is indistinguishable from magic." -
Arthur C. Clarke
Electronic devices can do many peculiar things when they fail. If you don't understand how they work then it may seem like 'magic' because the cause and effect is so unintuitive. But those of us who design and repair electronic devices know that no matter how weird the symptom there is
always a rational explanation. We know because we have to deal with it every day.
Types of power outage
Your description of the power outage suggests a combination of transient fault and brownout. This may have been caused by a short circuit somewhere in the grid, perhaps due to power lines blowing in the wind or a car crashing into a power pole. When this happens the grid voltage will sag due the high current in the short, then overload breakers will trip to isolate the fault and try to reroute power to other parts of the grid. The power at your location may momentarily drop to a low voltage, then rise
above the normal voltage as the fault is cleared and load reduced.
Most modern electronic devices such as clocks, TVs etc. convert the AC mains to a lower DC voltage via a
transformer and
rectifier. But the rectified DC still has the AC sine wave impressed on it, so a large
capacitor is used to hold the voltage up during the 'troughs' of the waveform. Depending on how much current the device uses, the capacitor may take anywhere from a few tenths of a second to several seconds or even minutes to fully discharge. At some point the voltage will go too low for the device to work properly, and then it will either misoperate or stop working altogether.
Many modern devices contain digital electronics which has undefined operation when the voltage is too low, so they include a
brownout reset circuit that operates
before the voltage gets too low. Because power outages are a thing, devices which need to maintain their state often have a backup battery,
super capacitor, or
nonvolatile memory to store important information while the power is off. However even devices that don't have such backup circuits may (unreliably) hold their state for a few seconds due to internal capacitance.
Electronics is a broad and complex field, but it is all very well defined by mathematics and logic. It is also a
fascinating subject that anyone with a reasonably logical mind can learn. But no matter how much you learn it's still magic - the magic of
technology.