But whether your passing game is helping you score is NOT just on the QB, so to judge QBs on how good they are by how good the passing game is overall by total yards is flawed.
You can have a really inefficient QB who throws a ton with great WRs. Very few of the QBs throws are on target, but those that are the WRs get large gains after the catch and balloon the total yard number. I would argue in that case, it's not the QB that is making the passing game work, it's the WRs.
Then consider the opposite. A really efficient QB who throw very little, with mediocre WRs. Almost every ball is on target, but the WRs never get very many YAC. If the passing game skews toward short throws, the total yards number would be very low even though the passing game is very effective.
QB efficiency is a measure of when the QB is tasked to throw, how well are they at making that a completed play. YAC don't matter, so the WRs can't inflate the numbers. Number of plays don't matter because it's normalized, so a QB with more attempts doesn't get an advantage just because they have had more passing plays called.