The Quality of a product, and the expectations of the client/customer, must be agreed upon ahead of the product being produced and delivered. If the product is below quality requirements, the project may need to spend more to get it up to agreed upon quality levels. If the product is above quality requirements the project may have spent unnecessary cost and time.
A project should have a Quality Management Approach document which identifies the level of quality for each output as well as the acceptance criteria as agreed by the client.