That sounds logical.
I understand your explanation like so:
(this is redundant, for newbie clarification and reference only)
There are 2 commands (processes) running in command :
sudo echo 120000 > /proc/sys/kernel/thread-max
For 1st command, sudo echo 120000, it is one process and
it is given sudo privileges ( sudo not really needed here).
Then when it completes and returns to Bash shell,
the first operation result is to be redirected as part of the second command (to be executed from and BY the Bash shell).
However, the Bash shell does not have sudo privileges.
that is why access to /proc/sys/kernel/thread-max was denied.
So in order to run these sequential commands (some of which
may need sudo privileges down the commands chain) we need to
run them in a shell with elevated privileges.
Hence the need to launch privilege Bash shell like so:
Again, thank you for your generous time.
sudo bash -c "your_command_chain_quotes_included"