This seems to be Poe's first publication of a naturalistic story. It takes place in ancient Jerusalem, and seems based on an authentic Talmudic story of how the priests of the Temple coped with a siege from an invading army. Because the priests needed proper animals for daily sacrificial rituals, they came to an arrangement to buy said animals from their enemies: sending gold coins over the wall in a basket, and then the enemy would send back the requested animals in the same basket.
The arrangement comes to an end when the Jews' enemies send them an unclean animal, a pig. Very much a simple "gimmick" joke, based on an obscure bit of Jewish lore.