In the original story of Ali Baba and the Forty Thieves, Cassim discovers the cave when he forces Ali Baba to tell him where he got the gold. The story goes that when Ali Baba returns from his first trip to the thieves’ cave, he brought home a small bag of coins and wanted to know how much was there.
His sister-in-law and brother, Cassim, have a scale and they borrow it. His sister-in-law wants to know what they’re measuring, which results in a blob of wax in the scales that catches a gold coin. The sister-in-law shares this with Cassim, who then forces Ali Baba to tell him where the cave is. From there, the story gets sticky and violent.