A user may configure disablewallet=1 for instance to prevent a wallet from accidentally being created (which could lead to confusion as to what to backup).
Since #13059 a user might also use that option to prevent someone with RPC access from dynamically loading a wallet there're not supposed to.
The most rigorous way to do the above is to compile with --disable-wallet.
As of #13112 unknown config arguments throw an error. So the user in the above scenario would have to remove this line. But then later if they download a new binary with wallet support compiled, they might forget to add it back. For that reason I believe disablewallet=1 should always be allowed.
Although unknown config arguments throw an error, the wallet interface added in #10762 includes a dummy wallet to handle --disable-wallet. Part of this dummy wallets adds disablewallet and other wallet parameters to the list of hidden params; those aren't shown in help, but their presence won't throw an error. This might change in the some future refactor though
So I added a comment that hopefully prevents a future refactor from causing disablewallet=1 to throw when compiled with --disable-wallet.