it was prob because you're internet connection was bad or you were laggin on minecraft when you have like a book with to many carictors it overloads the chunk and that makes it dupe but on Pika-Network they have a plugin that stops it maybe you're just lucky i think you should be able to keep the items because it was a mistake with the server if you were not hacking or any banned things like client side mods you're chunk that the chest was in prob had a chunk overload maybe a lag machine in the chunk you were in i am not staff i am just telling you what i know about it