No hysteresis would also increase the chance of oscillation caused by light from the LED shining on the detector. Obviously, if it's a red LED and the detector is UV, this won't be a problem.
The detector's pointing outside, the LED inside. They are mutually exclusive. And in any case any LED being picked up probably be drowned out by ambient light.