Why does a slightly out of specs power supply works and what are the possible consequences?
Because

The lamp works okay with 5V, and
It doesn't draw more current than the USB brick can supply. Maybe it draws slightly less current when provided with 5V instead of 5.6V, or maybe the original power supply just had some headroom (as indeed it should have).

Neither of these things had to be true, and there's no way to predict whether it works (or &quot;why&quot; it works) without cracking open the device and studying it, so we can't really say more.
As to whether it's safe — if your USB charger has really been tested to shut off under an overcurrent condition rather than melt or catch on fire, then that's good, but some manufacturers are more than willing to lie about such things. The lamp looks like a Philips, so it's probably designed not to let a simple undervoltage cause irreparable harm. But since you're operating both lamp and charger outside of their sticker specs, there are really no promises. Disaster is unlikely, but it's up to you.