When working with a Hilbert system a proof is a sequence of formulae $\phi_1, \dots, \phi_n$ where each formula is an axiom or follows from previous formulas (by inference rules such as modus ponens).
But when working in a natural deduction calculus, the rules are to be interpreted in a context (previous assumed hypotheses), so this definition doesn't work for natural deductions calculi (unless one works with sequences $\Gamma\vdash\phi$ that record the hypotheses).
How can one precisely define a proof in a natural deduction system as a "tree"?
The typical solution is to let a proof be a sequence of things of the form $\Gamma\vdash\phi$.
There are various notations that try to hide the $\Gamma$, but they seem to me to be both cumbersome to specify from a technical point of view and rely confusingly on "action at a distance" for a human reader.
In order to define precisely what is a valid tree in the notation in your image, one would still need to have a $\Gamma$ (or something very much like in it) present in the definition of "valid proof", even if it's not explicitly visible on paper.