I’m assuming GitHub has a fair amount of database/cache overhead for most things, especially branches. I think that most things the web client sees are all database content and that there’s no usage of git/filesystem in any hot paths for web views.
So I can easily see why having many branches is more storage than the same number of commits.
There are various repositories with 500k+ commits