This comes up a lot but when did Google say their platform was "open"? Maybe a few times in the early days when Google was still considered "cool" in hacker circles, but probably not in consumer-facing advertising? Moreover, "open" can mean a lot of things. I don't think I ever signed an agreement with Google that promised me source code for Android or the ability to sideload on my Android phone?
Android is acknowledged as a Linux distribution. Linux, also known as GNU/Linux, incorporates significant GPL-licensed code. By contrast, Apple has used BSD derivatives for a codebase, and BSD licenses, while F/OSS, are not "viral" in the way the GPL is, so Apple is not required to redistribute source code, or submit their patches upstream, and they can make proprietary additions anywhere they like.
AOSP is a separate initiative from Google to release the source code of Android to the public on a regular basis. Development of Android happens almost entirely in-house and contributions/requests from the general public are treated with minimum priority. The public AOSP repo is only updated with these changes after each new release of Android is finished. Google is not forced to release the source code, aside from their changes to the Linux kernel, which are minimal anyway as Android is moving closer to mainline. They may have separate agreements with OEMs that guarantee source code access but that's of no concern to Epic Games as a user/developer on the platform and not an OEM.
There is Supreme Court precedent for this