The king was a semi-barbaric man. His laws are polished and progressive yet untrammeled.
The king had a semi-barbaric way of administering justice. He placed a tiger behind one door and a lady behind the other. If the accused person gets the tiger, it is certain death. If they get the lady, she will marry the accused.
The king had a daughter, but his daughters lover was the person accused of committing a crime.
The king's daughter had signaled to her lover to pick a certain door. This is because she knew which door had the tiger behind it.
The young man opened the door, but the reader does not know what was behind. The lady, or the tiger.
The theme of The lady or the tiger is that your choices have consequences.