I did not intend to shit on web developers, by the way. It's not their fault, they just have to live with it. I just lament the history that lead to what they ultimately have on their plate. Early "web development" went tremendously wrong, owing partially due to the fact that the "hypertext" markup protocol and markup language were meant to be used in an entirely different way, and partially due to early hacks leading to early results in terms of "web applications". But those hacks came at the cost of making this layer sandwich in any way sane to begin with.
In my opinion, everything else since is an attempt to find a way out of that mess.
I was there when the web happened, though only watching from the side lines. I also remember that there were more fitting approaches early on, but a lot of them suffered under the Internet's explosive growth: Some of the "sane" stuff at least would have needed concerted efforts for plans that have to be executed over time. But the web was already a thing, and people desperately wanted to do certain things with it. The quick hacks for that were available immediately, and they were cool: "Hah, look what I can do. You can now get a travel itinerary through your city's public transport system from the World Wide Web. Isn't that amazing?" (At the time, it was.)
I'm not saying you cannot have joy in web development. As you say, it just wasn't for me. For the reasons above.