A similar situation can arise under duress. On the contrary to what people claim online, in dangerous places you want to cooperate with criminals, not get in between them and your stuff.
Under that type of stress it's very easy to forget passwords which might make criminals believe you're not cooperating. Having some things writen down (probably not all?) has come in handy for me personally.