Here’s a different take: when you set up an ad campaign for retargeting, you likely select users who “viewed or added to cart in the last 30 days”; you should also add an exclude for “users who purchased within the last 30 days” but it is very easy to forget the exclusion.
Also sometimes there may be communication lags between retailers and ad networks. Some retailers may only upload purchase data daily, sometimes there are gaps in uploads etc.
I think most advertisers would prefer to not advertise the same item that people just bought, but it takes perfect execution both technically and from the marketers creating campaigns to pull it off cleanly. When you’re managing dozens of campaigns across half a dozen ad platforms, it’s easy to miss some of the details that matter. And while the wasted ad impressions may annoy the consumers on HN, it is likely a rounding error for advertisers and not a huge cost driver.