Minecraft wiki entry for Block_and_item_duplication, associated text: When a chest is pushed by a piston, the contents are backed up a split second before it is moved. If you are in the chest interface and quick-move an item to your inventory in that moment then you will receive the item and the chest will be moved with the item still in it as well.