The code under the define was added to 4.4BSD in [1] in 1989 as part of
COMPAT_43. Later socket(2) related parts of COMPAT_43 were renamed to
COMPAT_OLDSOCK in [2] in 1992, unifying compatibility with 4.3BSD and
SunOS of that era. Later when code entered FreeBSD, the SunOS support was
dropped and COMPAT_OLDSOCK became an alias to COMPAT_43 used in the socket
code.
This code has no test coverage and no known users. The FreeBSD project
doesn't have a policy to provide timeless compatibility for pre-FreeBSD
versions of the code base.
Right now the existence of the code prevents some refactoring and also
increases attack surface, providing extra syscalls.
[1] https://github.com/weiss/original-bsd/commit/bff1e5c0020fe712a71c31e69e87013bd7048efb
[2] https://github.com/weiss/original-bsd/commit/eb10fef22b7ac333d2db2dc8dd71db68fc494619