My assumption has been they do that when the shipment is damaged or lost. And that they haven't implemented any sort of automatic refund or reship because some percentage of people don't notice, and that reduces Amazon's losses.
I've had at least one order when the order was damaged and it was automatically reordered by the system. I live in a big city with many nearby warehouses so it may be the exception. I suspect that it's better for delivery people to just ignore a damaged order than to report it and have it be a point against them. But I'm just guessing.