This is part of the language specification (see ID compatibility section)
You can also call any Objective-C method and access any property (On AnyObject) without casting for a more specific type of class.
This will simplify the interaction of Objective-C.
The manual also states the following:
However, since the specific type of the object introduced as AnyObject is unknown before execution, it is possible to inadvertently write unsafe code.
Obviously, since the validity of your code is determined only at runtime, this can be dangerous.
source share