It would help if there's a graphics presenting this.
The general premise probably doesn't need a diagram. The idea is that when code is committed that it needs to be "integrated" / compiled and then the built artifacts and executables actually need to be "deployed" somewhere. So besides the storage part of Version Control and the collaboration part (bug tracker, review, merging), then there's the run some stuff like scripts part.
GitHub Actions are that run some stuff part and it's a fairly separate piece of architect (storage is very different than compute). And it's fairly pricy to run that stuff on someone else's servers if you are doing a lot of it.
If you run on your own hardware then you can as well ignore github
So then if someone does have their own hardware and doesn't want to run an entire platform, just wants to compile cheaply on their own kit. Then they could install the runner on their server. However since that runner has to check in to the rest of the platform, there's some minor costs in communicating between the platform and the fleet of runners. And for the vast majority of people, a drop in the bucket compared to user fees. But for that minority of people that are running at scale to have the vendor change pricing models would be very infuriating.
and also self-host your git repo.
There are alternatives, but there's nuance here. An alternative can be to just replace the CI/CD, CircleCI, TravisCI, ConcourseCI, CodeFresh, or even GitLab CI can all hook up to GitHub and then do the builds/deploys. The other alternative is to run the whole version control and collaboration stack, there's GitLab, Gitea, Forgejo, and BitBucket (all that have their own built-in CI/CD systems that for the most part can also be replaced previous list).
But all of that is a lot more work than just running the built-in one that works pretty well and can run on your own hardware to save costs (up until Microsoft tries to stick ya with more of a bill).