This would allow wallet operations like funding transactions with smart contract-based inputs such as LN, or any input the Core wallet doesn't know how to sign for.

https://github.com/bitcoin/bitcoin/pull/17211#issuecomment-933674310
File));
        }
        else if (nLoadWaetRet == DBErrors::TOO_NEW) {
            error = strprintf(_("Error loading %s: Waet requires newer version of %s"), File, PACKAGE_NAME);
            return nuptr;
        }
        else if (nLoadWaetRet == DBErrors::NEED_REWRITE)
        {
            error = strprintf(_("Waet needed to be rewritten: restart %s to complete"), PACKAGE_NAME);
            return nuptr;
        } else if (nLoadWaetRet == DBErrors::NEED_RESCAN) {
            warnings.push_back(strprintf(_("Error reading %s! Transaction data may be missing or incorrect."
                                           " Rescanning ."), File));
            rescan_required = true;
        }
        else {
            error = strprintf(_("Error loading %s"), File);
            return nuptr;
        }
    }
    // This  is in its first run if there are no ScriptPubKeyMans and it isn't blank or no privkeys
    const bool fFirstRun = Instance->m_spk_managers.empty() &&
                     !Instance->IsWaetFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS) &&
                     !Instance->IsWaetFlagSet(WALLET_FLAG_BLANK_WALLET);
    if (fFirstRun)
    {
        // ensure this .dat can only be opened by clients supporting HD with chain split and expects no default key
        Instance->SetMinVersion(FEATURE_LATEST);
        Instance->AddWaetFlags(_creation_flags);
        // Only create LegacyScriptPubKeyMan when not descriptor