Why is it allowed to declare properties in categories [...] ?
Properties have many aspects (during compile- and runtime).
- They always declare one or two accessor methods on the class.
- They can change the selector when the compiler transforms dot notation to messages.
- In combination with the @synthesize directive (or by default) they can make the compiler synthesize accessor methods and optionally ivars.
- They add introspection information to the class which is available during runtime.
Most of these aspects are still useful when declaring properties in categories (or protocols) and synthesizing is not available.
Is categorisation purely a compiler technique?
No. Categories, as properties, have both compile time as well as runtime aspects.
Categories, for example, can be loaded from dynamic libraries at a later time. So there might already be instances of a class that suddenly gets new methods added. That's one of the reasons categories cannot add ivars, because old objects would be missing these ivars and how should the runtime tell if an object has been created before or after the category has been added.