when in Creative, a Shulker box containing items can be used to effectively duplicate items, such as 'original' books, by placing them and mining them again.
to recreate:
-enter creative mode
-place a shulker box and place test items in the box
-break the block - it will drop itself, containing the items as expected
-place the dropped block. the held item is not removed, so you can break and replace the box several times to duplicate the items inside...
That's because you're in creative mode....
When placing a block in creative mode, it is not consumed. That is be design. Change mode into survival and the held item will be removed.