Relates to MC-126244, which appears to describe this issue but is marked as "Fixed", indicating a potential reoccurrence.
The act of opening a chest with an explorer map inside it will cause the game to locate the structure in question, which can cause the game to temporarily freeze.
In most cases this is for a second or two, but particularly intense cases can last upwards of ten seconds: https://www.youtube.com/watch?v=SLr30V82_eo&t=17m50s
This could be fixed by, instead of generating the map data when evaluating the loot table, an “empty abandoned camp/ancient city/trial chambers/etc. explorer map” is instead generated, which only runs the structure location code when right clicked with.
I can confirm this happens and it is much worse on Large Biome settings with structures that are considerably rare which searches for thousands of blocks away.