This code demonstartes scopes of variable that is a variable in an inner declarative region hides a variable with the same name in an outer declarative region.
It creates an anonymous-temporary scope. Objects/variables have the same life-time as the scope in which they are declared, unless you do something that breaks that. An attempt to access anything within a scope that no longer exists will generate an error.
It's common to see anonymous-temporary scopes so that temporary objects/variables are not sitting on the stack when their use has passed.