I was surprised to see how far apart macadamia and hazelnuts are from each other. I always thought all trees had a common ancestor that was also a tree. But that doesn't seem to be the case? Did wood evolve multiple times?
The word "tree" is a not a taxonomic classification, but a human perceptual clustering based on form and size. The word "fish" has a similar problem, covering a vast collection of taxa, some of which are less closely related to one another than they are to us.
Becoming tree-like often has a strong evolutionary value, because plants compete for sunlight and taller plants shade shorter plants. Thus, we should not be surprised that "tree" forms have evolved independently in a number of different lineages.
The common evolutionary lineage for all of these, however, is tracheophyta, the vascular plants. These are plants that have differentiated xylem (which is the wood of a tree) and phloem tissues for transport of water and minerals. Most such plants are not trees, of course, but these tissues provide an effective means of vertical transport and the basis for hard woody material, which appears to have been the key differentiator between plants capable of evolving into trees and plants that are not able do to so.