Might have been trying to throw an incomplete pass and as he was going down the angle of release changed due to being hit. Not an excuse for him but I believe he was trying to make a positive play.
How many times have we said, "where in the world is he throwing--wow, great throw" all in one sentence? A bad decision turns out good.