In the story of creation man is forbidden from eating from the tree of knowledge of good and evil. Why was the knowledge of good and evil embodied in a tree specifically?
Putting some things together:
According to the Nefesh HaChaim (1:6) and the Rambam (Moreh Nevochim 1:11), the result of the sin of eating from the Tree of Knowledge of Good and Evil was some level of the internalization and assimilation of the drive for evil.
R' Hirsch (Horeb ch. 68) explains in his discussion of the meaning of the laws of Kashrus that the act of eating something creates the internalization of that thing. What you consume quite literally becomes a part of you.
Therefore, it was specifically eating which most accurately represented what the effect of the "knowledge of good and evil" was.