The LORD God planted a garden

Sunlight filtering throught leave of a knarled tree in the fall

Genesis 2:8-9 is topical, not chronological. God planted a garden on the third day, and man was created on the sixth day. Since the garden was made for the man, then that's how it's described.