If you run your program, you'll see that it prints "a" three times, because doStuff() is called on an Animal reference each time. The fact that one of the calls is through a Dog object doesn't matter at all, only the type of the variable. If you understand what overriding is and how it works for non-static methods, you should understand how this is different.
Static methods are never overridden. Overriding (or polymorphism) means that the runtime system decides what method to call while the program is running. Calls to static methods are always "hard-coded" to call a specific method from a specific class; the decision is never made at runtime for static methods.