Probably really hard to make a decision like that on the fly with a lineman up in your face. If I'm not mistaken, he actually wanted to go there pulled it back right before and decided to throw it after the DL was almost in his face.
Not excusing the throw but it's probably a take a sack or throw a risky pass. Should have taken a sack with the timeout but it is what it is.