I once worked on a large enterprise platform. We developed our own applications for the platform, and other third parties developed applications for the platform. We had to regularly scan our code to make sure we weren't inadvertently using internal or non-documented APIs that weren't available to third parties.
I always assumed this was related to some anti-trust lawsuit, but it always boggled my mind that Apple never seemed to worry about that. Remember the brazenness in which they booted third-party screen time and parental control apps from the app store after the introduction of Screen Time.