An app tells an OS it gonna use OpenGL to 3D render stuff. Generally, the OS doesn’t know whether it’s a competitive 3D shooter where each FPS really matters, or a web browser which only uses OpenGL to render a few textured quads. If the OS will default to slower integrated GPU, users will be unhappy, they want 3D performance. So the OSes typically power up the faster GPU in such cases.
On dual-GPU Windows laptop, nVidia partially solves this in their drivers, they have very long list of process names saying which ones are games or other 3D intense apps.
It usually works but very far from being 100% reliable. It requires GPU drivers to be updated regularly. For cases when it fails even with latest drivers, they have multiple methods for user to select the GPU. They implemented context menu on .exe files “Run with graphic processor” with 2 further options, for nVidia and Intel GPUs. They implemented GUI for users to customize that apps list. They also implemented a proprietary API for programmers to customize that list in code, I’m using this method in the installer of a CAD/CAM app I’ve developed.
These things cause quite a lot of complexity, both software bloat, and UI clutter. Traditionally, Apple wants the GUI to be clean. AFAIK they don’t push driver updates, and they avoid UI clutter even if it means some power users won’t get some advanced settings they might like.