I think git gets a bad rep because no one can agree how to use it. GitHub PRs vs pushing a branch, rebase vs merge are just two examples of tools that do identical things in fundamentally different ways. And the problem is none of them are wrong. Rebasing minor commits simplifies unnecessary complexity in your history. Merging preserves what actually happened which can provide insight into why changes occurred. Of co…
In practice, I actively rebase my commits in a PR with the sole focus of "What will make this easiest to review?". Then, once the review is completely I ask "What will make this easiest to operate and understand in the future?" I might squash everything together, or I might restructure into independently deployable pieces to facilitate rollback.
The point is that all these things might have different needs and it's ok to do different things at different times. But that's requires a little more judgement from individuals and is difficult to teach and enforce across larger teams.