A global variable has a much wider scope then a local variable and if the compiler does not see it as an error then whats the point in having a "redefinition error" if the compiler doesn't find all the errors in the variables scope.
It's giving priority over one variable scope then the other!
That's how local declarations work. It's good in a number of ways. For example:
int i = 42;
void foo ()
for (i = 0; i < 10; i++)
In this example the programmer can use a local variable "i" without having to worry
if s/he is corrupting another variable, of the same name, somewhere else. It's a feature.
I have found the arduino IDE is not finding all redefined variables in a sketch. This can lead to major programing issues that the compiler should catch!
It's not the Arduino IDE. It's the g++ compiler. The compiler shouldn't catch them because it isn't a bug. It's no good redefining in your head what C++ should do, and then posting a bug report when it doesn't do it.
Note, under some warning levels (which we don't appear to have turned on) you would get a warning
about a "shadowed" variable "i". The warning is because, although it isn't illegal, possibly you did not intend to redefine "i".