“And out of the ground the Lord God made every tree grow that is pleasant to the sight and good for food. The tree of life was also in the midst of the garden, and the tree of the knowledge of good and evil.” – Gen. 2:9
God created trees to grow that were pleasant to the sight. He didn’t have to do that. That was just Him showing off.
He could have made trees that were not pleasant to the sight. But He didn’t. That was just Him loving us.