In tree leaves, it could be leaves from a single tree or multiple trees. Hence, you can't pluralize tree into trees leaves, tree isn't allowed to recieve a plural there. If you write it as tree's leaves, then tree is singular, and the form is possessive (whereas before it served to disambiguate from, say, leaves of a book). Then you can also pluralize tree to trees' leaves, and now it's leaves from multiple trees.