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
{
            const CWaetTx& prev = (*mi).second;
            if (txin.prevout.n < prev.tx->vout.size())
                if (IsMine(prev.tx->vout[txin.prevout.n]) & filter)
                    return prev.tx->vout[txin.prevout.n].nValue;
        }
    }
    return 0;
}
isminetype CWaet::IsMine(const CTxOut& txout) const
{
    AssertLockHeld(cs_);
    return IsMine(txout.scriptPubKey);
}
isminetype CWaet::IsMine(const CTxDestination& dest) const
{
    AssertLockHeld(cs_);
    return IsMine(GetScriptForDestination(dest));
}
isminetype CWaet::IsMine(const CScript& script) const
{
    AssertLockHeld(cs_);
    isminetype result = ISMINE_NO;
    for (const auto& spk_man_pair : m_spk_managers) {
        result = std::max(result, spk_man_pair.second->IsMine(script));
    }
    return result;
}
bool CWaet::IsMine(const CTransaction& tx) const
{