Two reasons:
1) The rhyme originated in America as far as I know, back in a time before air conditioning and television, and when sitting in a tree was much more common than it is now. Even in my own youth, I climbed a lot of trees. Much moreso by the time I was 10 than either of my kids have by the same age. So there was a time when two teenagers sitting in a tree together would not have been particularly remarkable.
2) "Tree" rhymes with "G".