Searching for a discount code reliably produces a page of offers, most of which fail at checkout. The persistence of dead codes is a product of how the pages earn money.
The page earns from the visit, not the code
Coupon sites are paid a commission when a visitor clicks through and completes a purchase, and that attribution is usually established by the click itself.
A shopper who tries several codes, finds none that work, and buys anyway can still generate a commission, because the click set the tracking in place.
Removing expired codes would therefore reduce the number of listings drawing visits without removing any real cost to the site.
Volume of listings drives search visibility
Pages compete for searches naming a retailer and a discount, and a page with many entries and frequent updates tends to perform better than a sparse one.
Expired codes contribute to that volume, and marking them as expired rather than deleting them keeps the page large while appearing transparent.
Some sites display a success rate or a last-verified date, which conveys freshness without requiring that anything be removed.
Verification is harder than it sounds
Confirming a code requires building a qualifying basket, since many codes apply only above a threshold, to particular categories or to new customers.
A code that fails on one test basket may work on another, so an automated check cannot cleanly distinguish an expired code from an inapplicable one.
Retailers also run targeted codes that work only for specific accounts, and those appear broken when tested by anyone else.
Retailers benefit from the ambiguity
A shopper who searches for a code and finds only expired ones frequently completes the purchase anyway, having satisfied themselves that no discount exists.
That outcome is better for the retailer than one where a working code is found, and it explains why retailers rarely press for stale listings to be taken down.
Some retailers actively supply codes with narrow eligibility, which populate these pages while applying to a small share of the visitors who try them.
What tends to actually work
Codes issued directly by a retailer to an identified customer, through email, an account or an app, apply to that account and are the most likely to function.
Publicly advertised promotions with stated end dates are also reliable, because the retailer is committed to honoring what it advertised.
Anonymous codes of unknown provenance are the least reliable category, and the time spent testing them is often worth more than the discount they would provide.