We’ve been moving in the direction that all wallets must have a name. Therefore, we shouldn’t allow creating new unnamed wallets. createwallet, restorewallet, and the wallet tool’s create and createfromdump all now require the user to provide a non-empty wallet name when creating/restoring a wallet.
The GUI is already enforcing this, but we were not enforcing it for RPCs or in the underlying CreateWallet and RestoreWallet functions.
Wallet migration does still need to be able to restore unnamed wallets, so there is a new argument to RestoreWallet to explicitly allow that behavior for migration only.