Many web application frameworks already have extensive built-in optimization features, though examples like the one that you shared indicate that there are fundamentals that many people contributing to the modern web simply don't grasp or understand that these frameworks won't just 'catch you out' on in many cases. It speaks to an overreliance on the tools and a critical lack of understanding of the technologies that they co-exist with.