Apple processes the source code before releasing it as open source, like excluding some source files and even stripping specific #ifdef sections. This can be implied from shell scripts that are part of the tarballs.
Such an approach would be way more complicated if the open source release included version control history. These code drops already always come months after the macOS releases.