One important difference between macOS and GitLab is that there are people running GitLab's free-software edition (e.g.,.
https://salsa.debian.net/ ), and I know of I think nobody who's running Darwin.
Android leans towards the GitLab side because there are meaningful third-party distributions of Android.
Matlab is an interesting case because there are extremely popular libraries using its open-core components - essentially the entire scientific Python ecosystem depends on them, so while e.g. Jupyter Notebook doesn't ship LAPACK or FFTW itself, a huge number of its users pip install scipy, and many install PyFFTW. And from where I sit, the scientific Python ecosystem appears to be eating Matlab's lunch.
I don't know if "open core" is the right term to distinguish these cases, but there is an interesting distinction - third parties meaningfully using the free subset, third parties not meaningfully using it, and third parties using a competitor product based on the free subset.