My speculation, never having set foot in an Amazon warehouse:
1) Amazon stockers are told to put the incoming inventory in a spot, and scan all visible barcodes on the product, which are all associated with that product in Amazon's DB henceforth. Normally extraneous barcodes are no problem because they aren't SKUs, so no one ever tries to pick them by the extra codes. Easier to tell the stockers to scan everything than to try to get them to pick the right one.
2) Company X, Y, Z ship their products to Amazon with their own barcodes and fail to remove the box company codes. Dozens of different random products around the warehouse end up with a secondary, identical barcode associated with them.
3) Someone orders boxes. Inventory system probably automatically sends pickers to the closest source of SKU 12345, of which there are - unusually - many scattered around the warehouse. So the product received is essentially random, out of whoever uses these boxes. Product roulette!
4) Customer service can't solve this problem. Maybe there's someone in Amazon's inventory team that can go in and fix it, but it occurred for good reasons! Everyone was behaving rationally. There are probably other similar problems in the database as well.