In the case in that link, the publisher was not legitimate. Amazon (literally) sold a pirated copy. They refunded, allowing you to buy a non-pirated copy. The alternative would be to swap it out for a copy from a legitimate publisher, but I assume there are laws around swapping goods out from under people.