It seems there’s a bug in pubsub implementation.
When publishing a pubsub item with an already used ItemID, Openfire does not overwrite the item but generates a new ItemID.
From XEP-0060 “Note: If the publisher previously published an item with the same+
ItemID, successfully processing the request means that the service MUST
+overwrite the old item with the new item and then proceed as follows.”