I think what you are missing shallom is, just as Andy said, "another is the quality upgrade level of the corporation".
Which means you do the average weighted supply of materials thing AND THEN increase it again depending on the quality upgrade status of the corp (which can be uo to 200 for a state corp, more for private).
The quality upgrade value, say 200, doesnt mean the average weighted supply quality is multiplied by two though, it isnt that simple, and I have never worked out the exact ratio. But this is why you are seeing high quality product output.
Do read the documents, there are hundreds of things in there that will become clear to you. This is a complex game to master.