Git doesn't even need to be "hosted" anywhere. That's the point of it being distributed. What needs to be hosted somewhere are all the barnacles (like issue tracking, code reviewing, CI, and so on) that have grown out around git, that people and businesses have become dependent on.
Which is why they cleverly moved the central story of a software change from the commit to the PR. Commits migrate automatically with the repo. But migrating PR descriptions and comments takes engineering effort.
LFS files sorta do need to be hosted. At least, it exists because full clones are untenable for many projects.
It doesn't have to be. But without a hosted "source of truth", it's kinda hard to actually distribute it, and have a way to accept pull/merge requests/patches.