It is possible to configure an Exchange server such that mailbox retention period is zero, and thus disconnecting a mailbox would result in its immediate deletion instead of being moved to the Disconnected Mailboxes list.
Therefore, Set-MailboxUser should do a sanity check to ensure that retention period is non-zero, and preferably at least 7 days, before proceeding to disconnect any mailboxes.