Part of the problem is the review quality is almost as inconsistent as the article quality.
From experience I can tell you that rejecting papers is a lot more work than accepting them. It requires arguing things in such a way that it survives editor scrutiny. This in turn requires actually reading the paper, doing some background checks, etc. Of course editors getting involved also means work for them. So negative reviews tend to trigger a lot of work. So much easier to just rubber stamp the reviews that give a thumbs up.
And editors have the problem of needing to fill their journals with stuff. Nobody reads these things cover to cover. So, there's a lot of filler content that will never be cited that got rubber stamped by reviewers taking a five minute glance at the text. As long as the article is not too blatantly bad, nobody cares. A common practice is to invite accepted authors back as reviewers. So, there's a notion of bad articles leading to equally bad reviews.
It is not surprising that there are researchers that game the system by publishing in friendly publications where the reviewers/editors are known friendly. They all need to keep their numbers up.
A possible fix could be to review out in the open. Publish reviews along with the article. Allow scientists to challenge these as well. It's one thing to say "this is probably fine" anonymously than it is to say, please publish this with a message stating that I approve and endorse the content of this article.