Why a damaged LED was acting like a weird memory cell?
The reverse current heats the crystal and reduces the breakdown voltage. Then there is a breakdown.

The area of the semiconductor transition is significant in relation to its thickness. The breakdown takes place in a much smaller area. In a place that is more prone to breakdown because of the lack of manufacturing.

The breakdown location behaves like a resistor and not as a semiconductor.

Direct current flows mainly through this "resistor". It works like a shunt so there is no light. Next, the "resistor" warms up and blows off.The breakthrough area is separated from the surviving part of the crystal. The LED starts to shine.

But in fact, LED is irreversibly damaged.