In traditional “waterfall” software development, “good” software meets the written requirements. No matter how bad the requirements – “good” software meets the requirements.
In agile software development, “good” software meets the quality goals set by the team, and delivers the features defined by the product owner. No matter how deluded the product owner.
Both models seem unsatisfactory.