The intent is to avoid getting their *** kicked.
That is about as obvious as all hell.
However, no one will ever be able to judge the intent of where the QB threw the ball.
Over here, over there, receiver ran wrong route, yadda yadda.
Everyone knows why the ball is being thrown. Nobody knows why the hell the QB threw it where he did so to make things easy, if there isn't a WR in the area, its a flag.
As a result, you get flagged if you a throw a ball in the face of pressure and it happens to land 20 yards from your nearest receiver.
Pretty simple. Sucked that it was called but it was the right call.