>most userland utilities and the C library on OS X are derived from FreeBSD versions >FreeBSD 9.1 and later include a C++ stack and compiler that were originally developed for OS X, with major parts of the work done by Apple employees
>After being fired from Apple, Steve Jobs founded NeXT Computer. The NeXTSTEP operating system ran a BSD userland on top of a Mach kernel. Apple later bought NeXT, which was how Jobs wound up back at Apple. After he was promoted to CEO, it was decided to rewrite MacOS with a Unix base. I can only presume that since Apple already had the NeXTSTEP code at hand, that was a major factor in the decision. FreeBSD had a more readily maintained and up-to-date userland, and NeXTSTEP already contained a lot of the code needed to make that work with a Mach kernel.