Docker on OS X uses a Linux host for the containers, 99% of the time
it's the boot2docker image. The user and group within the image (and
their IDs) is different from that of the OS X user. However, the Linux
host machine also has the OS X host /Users folder mounted (using a
VirtualBox share). Given the permissions of the Linux user inside the
container, the OS X user's folders are writable.