Why don’t aircraft have interlocks to prevent high-lift devices from being retracted when doing so would stall the airplane? Most aircraft have high-lift devices on the wings (such as flaps, slats, droops, whatevs) to allow them to take off  and climb out at a reasonable speed instead of having to accelerate to near cruising speed while still on the runway; this enables the aircraft to use shorter runways, but also places it at risk of stalling if these devices are retracted too early in the climb (example).

Given the danger of retracting high-lift devices at too low a speed, why don’t aircraft have interlocks to prevent this from happening?
Most modern airliners have some form or other of mechanism that does exactly that, mostly for the slats (which are more important in stall prevention, anyway).

E.g. on modern Airbusses, there is a Slat Alpha Lock function which prevents slat retraction at high angles of attack, on the Boeings there is a Slat Auto-Gap function extending slats from mid to gapped position at high angles of attack.

Military aircraft often have automatic slat deployment to aid with high angle of attack manoeuvres, and even some vintage aircraft did have aerodynamically activated slat-like devices for stall prevention.

Any sensible reference suggestions welcome for any of these... cannot post mine.