If you had to reason about your code as a tree when writing it, I think it would quickly be cumbersome.
Remember that we're talking about the API here, not the internals of the implementation.
If I had to explicitly say "tree", I agree. But if what I was writing was in fact not a tree, I think it would be substantially more difficult.
Sound theoretical underpinnings are usually necessary for a coherent system that allows for good abstractions.
Note that in code while I don't say the word "tree" while writing it. I create a tree with my braces (C) or indentation levels (python) and file structure. The language designers created a syntax using a tree. And so on.
I guess what I'm saying is that while the tutorial should not say tree, and I should not be thinking about tree nodes and edges while writing it, I should be writing a tree (and in code I am).
Is a text box with a reply button a widget? What about just a text box? What about just a button?
Assuming all three, it sounds like you have one widget composed of two other widgets, which naturally ends up creating tree structures.