That's what he saw, and rather than be a robot and just run out of bounds after getting the first down, which is what all coaches everywhere tell their QBs in practice, he did what was needed to win.
If he was doing a lot of running sideways, dancing and weaving in and out of defenders, draining the little time left, then that would be dumb.
But, clock stops for first down, one timeout left, over 60 yards away, need a TD, under 30 seconds left ... if you can pick up 30 yards you do it.