BTW, ‘man hdiutil’ is your friend - seems it might be related to the filesystem type of your test machine:
PERMISSIONS VS. OWNERS
Some filesystems support permissions including users and groups. While important for security on a managed filesystem, users and groups ("owners") pose challenges for unmanaged, shared filesystems such as
those typically present in disk images. macOS's solution to this problem is to make owners optional, both while creating files and enforcing permissions.
By default, unknown HFS+ filesystems on "external" devices (including disk images) mount with their owners ignored (mount -o noowners). Normally when owners are ignored, the system uses a special _unknown
user and group to dynamically substitute the current user's identity for any owners recorded in the filesystem. These _unknown owners are even written to the volume when creating new files. The new files
will continue to have "floating" ownership when mounted with owners honored. The net result is that shared volumes behave as expected regardless of how they are accessed.
The behavior is different when disk images are attached. With disk images, the owner of all files in a filesystem mount for which owners are ignored is the user attaching the disk image. The attaching owner
is also used when creating new files.
On modern macOS systems, root (UID 0) can "see through" the "owners ignored" user mappings. Thus
sudo ls -l /Volumes/imageVol
will show whatever is really stored in the filesystem (possibly _unknown) regardless of whether owners are currently being honored on that volume. In contrast, non-root users will see themselves any time
_unknown is in effect, whether the default for the mount when owners are ignored or because _unknown is stored on disk. For disk images, non-root users will see owners matching the user that attached the disk
image.
Unlike owners, permissions are never optional. A non-writable file will not be writable just because owners are ignored. However, a file that is writable by its owner will be writable by everyone if _unknown
is the effective owner of the file for that file. Because anyone accessing an owners-ignored file is treated as the owner, everyone is effectively the owner. Because the default behavior for disk image
filesystems is for all files to be owned by the user attaching the disk image, other users will be treated per the 'group' (if applicable) and 'other' permission modes.
diskutil(8)'s enableOwnership or the Finder's Get Info window can be used to configure a system to respect the on-disk owners for a filesystem in the future.