There are some occassions when you need the value of the variable to be immediately followed by text. There are many occasions when you want to execute a command and keep the result around. For example, you may want to keep the list of files in the current directory stored in a variable. The commands can be any set of commands. There are conditional expressions and while loops which use Boolean values.
Commands act on files and produce visible output.
Every command succeeds or fails. An exit code holds this value. The exit code is not visible. A value of zero stands for success, anything else for failure. Generally, the exit code is not documented anywhere.