Some information passed to bitcoin-cli may be too sensitive to pass on the command line, as that can (usually) be seen by other users on the system in the ps output.
The most straightforward solution for an alternative is to add an option to bitcoin-cli that takes the input (or part of the input, e.g. the passphrase argument to walletpassphrase) from stdin instead of the command line. In contrast to a fully-fledged interactive shell (which would also be nice to have, see #3122), this can also be useful in scripts.
See #7122 (comment) for discussion.