Often this is via special entitlements [0]. Published APIs, which you're only allowed to use if Apple approve your request.
Apple typically don't publish the criteria for when they approve entitlements, so it's almost impossible to get approved. You need to be a big company with contacts inside Apple.
Meta, Google etc. will all have negotiated a bunch of these entitlements for their own apps. But smaller companies are totally shut out.
We have seen competitors (big, well-known apps) do things on iOS that most definitely are not possible with public APIs. Either Apple willingfully provides access to these APIs to a select few companies, or they don't care that they reverse-engineer private APIs and then use them. If it's the latter, the competitor app was probably too big to be banned from the app store for this.
Apple was unwilling to comment on the situation when we asked them.
Apple would never give Meta access to private APIs. Eric has access to everything that the Meta View app is doing.