Actually, the behavior you are seeing is in the documentation. It's just in the NSImage documentation and not the CALayer documentation (emphasis by me):
Using Images with CALayer Objects
Although you can assign an NSImage object directly to the
contents
property of a CALayer object, doing so may not always yield the best results. Instead of using your image object, you can use thelayerContentsForContentsScale:
method to obtain an object that you can use for your layer’s contents. That method creates an image that is suited for use as the contents of a layer and that is supports all of the layer’s gravity modes. By contrast, the NSImage class supports only thekCAGravityResize
,kCAGravityResizeAspect
, andkCAGravityResizeAspectFill
modes.