Is that "Terms of Service" modal there because a front-end dev thought "interrupting the user experience is a great idea!" No, it's there because of legal. And all those social sharing widgets? They are there because of marketing. And the 5 different ad exchanges? They are there from Sales/BizDev. And that 400KB of JS crap? That's Optimizely and their crappy A/B testing library that the dev team put it. And that hero image that's actually 1600px wide and then resized in CSS to 400px? It's there because that was the source image from the external agency and no one thought to modify it.
The biggest challenge with modern web sites/apps is that they are largely built by committee. Often its not literally built by a committee, but I mean that while multiple departments are all involved and all get to add to the site, but no one is really responsible for the final, overall user experience of the site.
And even if there is a "user experience" or "performance" team, they rarely have the power to change things. A customer of ours is a Alexa top 100 B2C company that provides a market place for buyers and sellers. They get commissions from sales, but a large part of revenue is ads. The "performance team" makes no head way against any of the terrible performance problems with ads because the ads team is judged based on the ads/conversions, not on performance of the page. Even when the ads are hurting the conversion rates of the sales/commissions, the ads team doesn't care. It's total deadlock of departments saying "performance and user experience is not my responsibility, I only do X".