Much of our identity, our memories and our information is stored online nowadays. And all are encrypted with a password, think of your mobile phone, Facebook account, computer, website admin page, et cetera. Therefore, it might be useful to give your family and/or Trustees access to these locations after you pass away. They will then be able to, for instance, close down or memorialize your social accounts, shut down any subscriptions you have or preserve memories by having access to your pictures. Giving them access could save them a lot of headaches.
The keycodes to any account or device can be stored, no matter for what purpose. And they will be safe there throughout your lifetime. Nobody will have access to them, apart from the people you assign them to. And only after you pass away.