Well, AF_UNIX sockets are sockets with paths in the filesystem. You must either connect() to them or bind() to them instead of open()ing them. Apparently, BSD-derived versions of cat will try to connect() to to a file if open() fails.
With GNU cat, if you try to cat a socket, it will go like this:
$ ls -l test.sock
srwxr-xr-x 1 luke users 0 Nov 12 21:07 test.sock
$ cat test.sock
cat: test.sock: No such device or address
but BSD-derived cats will successfully open the socket for reading. That behavior can be accomplished on other systems by using socat instead; BSD cat behaves somewhat like: $ socat UNIX:test.sock STDOUTAmusingly, the BSD socket behavior can be disabled with the compiler macro -DNO_UDOM_SUPPORT, but as far as I can tell it is not documented nor hooked into the rest of the build system in any way since its introduction in 2001:
https://svnweb.freebsd.org/base?view=revision&revision=83482