It's not a coincidence that these attacks are prevalent in the frontend world.
Most frontend developers are mere trend followers instead of hackers and have agreed to obtuse, over the top solutions because that is what the industry says. It has become the norm to have countless layers to show a simple checkbox tied to a boolean column in the db.
Just because everything is wrapped in one install command like create-react-app doesn't mean it's actually better.
Of course there are exceptions but the vast majority of designers and front end developers fall into this bucket.