IME, they get into companies that don't fire people (or government jobs) but rather move people to other projects, or they bounce before they're discovered to be incompetent. Companies often won't make stronger statements than "X worked for us on these dates" (the company, individual recommendations may be different). Barring legal trouble you may have caused, if the issue of departure is primarily performance, they don't want you suing them for making unprovable negative statements about you.
That's a pity inasmuch as it punishes those who have done well on a job. I would really appreciate it if when checking references a past employer would feel comfortable saying good things about my work.
In the US, get rid of our sue crazy nature. Then we might be able to have nice things again. Or get specific letters of recommendation from your past employers/managers, they'll provide those if you perform decently. You'll probably have to go to a specific manager, though.
I think many companies are largely dysfunctional, driving top performers away (or never hiring them in the first place) while keeping people who copy/paste and fumble toward "good enough for this sprint".