A top-level /AppleInternal/ directory on macOS, even if empty, will enable certain features in Apple developer tools.
It seems to be most common in systems that cross major business domains (or come from completely separate companies). If you could just add an entry to the featureful, versioned, controlled config file then you'd do that, but if you can't developers frequently resort to the "does this path name resolve" heuristic.