The private key for the account would be derived in the MetaMask browser extension using the provided index and the mnemonic phrase it was initialized with. The private key won't leave the extension.
The complete examples of how to use it in browser can be found here.
Account persistence
Account can be persisted and restored by saving values of index, address properties
It can be used to remember accounts between app restarts.
Account discovery
In addition to the above, it is possible to get access to a sequence of accounts that already have been used on chain. It is needed, for example, to restore the previously used accounts in case the user connects MetaMask to an app that doesn't aware of them.
Error handling
If the user rejects an action (snap installation or connection, address retrieving or transaction/message signing) you will get an exception as a plain object with property code equals 4001, and message equals "User rejected the request.".
If the snap downgrade is requested, the code will be -32602.