It actually does add 1 to the value of 'a'. Unfortunately, the value of 'a' is undefined every time the loop() function is called.
In fact the language definition says that what happens is each time round the loop a new local
variable is created, which happens to have the same name as one from the last time round the loop,
and is undefined in value. At the end of the loop body the variable is notionally destroyed.
This matters with class-valued variables as the constructor and destructors will be called automatically.
'static', when used inside any function limits the visibility of the variable to the body of the function,
otherwise its global just like a static variable at top level.