Well, I've only seen 2 and 4. 2, without hyperbole, may be the worst film I've ever seen. 4 is bad, but kind of guilty pleasure bad. Even so, far better guilty pleasures exist out there.
But I can think of a few reasons:
-Transformers has an in-built fanbase. Now, from what I can tell, a fair portion of that fanbase dislikes the "Bayformers," but that aside, Transformers is pretty well known. I've never really been into it bar watching Beast Wars in the 90s, but I understand it was big back in the day, and from my experience, it's popular among kids in the present as well.
-They're undemanding. You go into a Transformers film, you know what you're going to get. Good Autobots vs. bad Decepticons, with a human protagonist that represents the everyman, coupled with the military getting in some kills of their own. Thing is, films cost time and money. So when you have limited time and/or money, it's understandable that at least some people will want to go for the 'sure thing.' With a Transformers film, you know what you're getting. For non-franchise films, you can't say that as readily.
On the other hand, a lot of franchises have a formula and stick to it, for better or worse. I've made no secret that I'm not a fan of the MCU for instance, as I find the films to be formulaic, regardless of characters. But compared to the Transformers films I've seen, the MCU is bloody Shakespeare. Franchises may follow formulas, but other franchises have still followed formulas with a modicum of quality. For whatever reason, the Transformers films are immune to critical savaging.