Because it is virtual. What you observed is the heart of OOP, without it OOP could not be OOP. Please see:
http://en.wikipedia.org/wiki/Dynamic_dispatch[
^].
The method
Display
is called indirectly, via the
virtual method table:
http://en.wikipedia.org/wiki/Virtual_method_table[
^].
This is what makes
late binding and, hence,
polymorphism possible:
http://en.wikipedia.org/wiki/Late_binding[
^],
http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29[
^].
You example is very funny: you discovered OOP by a chance, as a result of pretty much random try. Congratulations! Unfortunately, the opposite case is more typical: some people manage to use classes, inheritance, even use the word "virtual" but never do any OOP, some people manage not to get it for years. :-(
—SA