The point is to allow "password-based" areas. Like the Moria entrance in LoTR, or Ali Baba's "Open Sesame".
The player has to get the password from a NPC or exploration, then the key prevents the player from entering, and the script allows the player to select the reply containing the password.
That's just one of the possibilities offered.