Many of us remember life before Github, and web UIs for other version control systems existed before Git. Github is just a Trac clone and no one can claim with a straight face that it's somehow completely unrelated.
Put Trac and GitHub side-by-side, and they're obviously different in tons of ways. Put Forgejo and GitHub side-by-side, and you can easily confuse the two if you're not paying attention.
Of course there are plenty of elements from GitHub that existed in previous systems in some form of the other, and I'm sure the GitHub people looked at them. But the way GitHub implemented things was a marked shift from what came before (the most significant being the "source-first" view of projects – rather than "wiki first" view of Trac of listing of attributes of SourceForge – and their implementation of Pull Requests).