You can't just boost your Yards per Attempt by throwing 60 yard bombs while your receivers run crossing routes underneath. If you throw the ball 30 yards downfield but no one catches it, then you moved the ball 0 yards on the play. That's how many yards you get to count for the attempt. Then, it's fairly straightforward to compute the average number of yards per attempt.