I remember there was a year or two that I liked diagramming sentences at least a bit. There id a puzzle-solving aspect to it, and it appealed to my sense of putting things in order. I had one junior high English teacher who was particularly fond of the practice. Like penmanship, not talking in line, and coloring Argentina in neatly, we were not told exactly why this thing was important. It was just known to be very important, part of your becoming an adult. I am not sure most of the teachers could have articulated the reason behind these lessons beyond the standard cliches, as that sort of thinking was not their strong suit. But if pressed, I think educators would say that it helped teach parts of speech - itself an overrated bit of knowledge - and gave some understanding of the underlying structure of sentences, which would be important for...for writing better sentences. I doubt it worked that way. The children good at diagramming were usually also good at writing sentences anyway, so measuring the advantage would be difficult.
It is an excellent example of how educators used to think, and I believe still do. They can't measure the value of it and certainly aren't going to try, but they just know it's good for you. It's part of the knowledge that is handed down over years because this is a profession, and everyone here just knows it. We all feel that about the jobs we do until someone comes in and objectively demonstrates we are wrong and have to change our ways. They resist objective measurement.
I suppose it is possible to diagram any sentence if you lick the tip of your pencil and buckle down and keep working at it like a puzzle. But consider the sentence "What the hell is that even about?" What are you going to do with hell in that sentence? What are you going to do with even? One tries to remake the sentence in terms of the core pieces and the modifier and you get That is (even) about what (the hell)? No, it won't do. There is nothing in the exercise that is going to teach you to write a better sentence or appreciate the structure of English, unless you are going on to the level of studying linguistics and observing language change. If diagramming and parts of speech is the best way to teach that, it can be safely learned then.
Just one more reminder that the good old days of education weren't. (Diagram that. You have to put in implied words, even though the sentence is understandable without them.)