This function is often used to protect a variable name from surrounding characters.
$ var=foo
If we want to concatenate the string at the end of $var we cannot do:
$ echo $varbar $
as this is trying to use the new $varbar variable.
Instead, we need to wrap var in {} as:
$ echo ${var}bar foobar
source share