"They keep all products with the same ID in one area"
No they don't. Google 'random stow' and you'll find articles about how Amazon stores incoming items. They are stowed somewhat randomly, but scanned as they are stowed. So the system knows where to find each unit again, and can use that to optimize picking paths.