It’s mostly because pull requests are what is being tested in CI, not individual commits. Might as well squash as nobody wants to deal with untested in-between crap.
If you mean stacked PRs, yeah GitHub absolutely sucks. Gerrit a decade ago was a better experience.