Very interesting question that requires a dissertation on quantum physics to fully answer.
The short of it is that light is affecting some device it is shining on, that is not designed as a photocell. This is possible because the device is not encapsulated but is mounted as a CSP (chip scale package). See how light can upset the behavior of CSP causing a product to crash:
https://www.eevblog.com/forum/blog/eevblog-716-raspberry-pi-2-xenon-flash-problem-explained/Now, in that thread the problem is that bright light upsets the chip and causes a crash. In your problem light is required for correct operation. These are both consistent with the behavior of silicon ICs: light is trapped in the silicon and creates charge carriers (electrons and holes) which then diffuse through the silicon. In a very bright flash, the amount of charges is huge, and can upset the state of the device making it lock up from sudden voltage fluctuation. In a dim light, the amount of charges is low, but they do move around in the silicon and interact with other charge carriers. If a transistor is injecting a lot of charge because it is damaged, the charges generated by the light can recombine with them before they upset something else.
You can look at it as another way of diagnosing a faulty chip, similar to using freeze spray. You're creating a condition that makes a damaged chip work a little bit better by reducing the amount of effective leakage current that is screwing it up. The chip will need to be replaced.