Try writing the code for an autopilot some time. It's hard. We spend a lot of time flight testing just the autopilot.
Making something go in a particular direction at a particular altitude at a particular speed is hard enough. Throw in a stall and the best the plane can do is try to nose down.
Fair enough. My main point is that we spend a lot of time trying to get the autopilot to function right, but it's not an easy problem where you can just throw a bunch of edge case detection code in. There are lots of physical control laws involved in a/c code that you can't break. Silly laws of physics type things.