I had to laugh, reading this. When Steve Jobs panned Flash because it supposedly was the cause of lots of dog-slow websites, those of us who were Flash developers knew it was just a matter of time before there started being loads of dog slow HTML 5 websites. The first generation of those sites happened to be mostly in JQuery and AngularJS..
So of course, AngularJS had to be replaced by a newer, "faster" technology, mostly React. And now, here we are bemoaning how dog slow React websites are. And it won't be too long before there are posts complaining about how slow each and every technology suggested in the comments to this post is.
Your intuition is good that the role of a good framework is to put rails around developers, but that only succeeds to the extent it manages to turn them into better developers. Because the real problem with dog-slow websites is developers who don't understand how their technology works and how to write maintainable code in it that performs well. What usually happens, though, is developers don't "get" why opinionated frameworks have the restrictions they do, and you wind up with blog posts that talk about how unnecessary those restrictions are (and really any best practices), and then other developers point to those posts as excuses for why they don't need to implement best practices in their code. And when that results in poor performance, they blame the framework and the rewrite the site in the new hotness with a team that starts as the same developers but gradually morphs into a different team as the old developers take their shiny new "skills" and leave.
I don't really think there is a solution to this problem, because a lot of times decision-makers have no idea who is telling them the truth about what best practice looks like. And best practices are often unintuitive to many developers and take discipline to implement. They're not politically popular, so it can be difficult to even make a case for them without getting fired. And this is the truth no matter what framework/library you're using.