The main lesson of this story is to do with man's relationship with time. Ostensibly, the story seems to capture the way that time irrevocably changes things, as summarised by one of the key quotes from the tale: "Nothing stands still, except in our memory." Tom therefore has to cope with the fact that the garden he is able to access at night is not there during the day, and that the grand house has been reduced to a number of smaller appartments and that the garden has been sold and built upon. However, at the same time, the author seems to suggest that the powers of imagination and childhood love are able to at least cheat time to some extent. Note how Tom, at the end of the book, bids farewell to Mrs. Bartholemew, who is of course Hatty, as observed by his aunt:
There was something else, too, Alan, although I know you'll say it sounds even more absurd... Of course, Mrs Bartholemew's such a shrunken little old woman, she's hardly bigger than Tom; anyway: but, you know, he put his arms right round her and he hugged her good-bye as if she were a little girl.
Time does of course hold mastery over humans, but through imagination and love, Tom shows that he is able to still see Mrs. Bartholemew for the childhood friend he knew. Even though time changes us and our world physically, it need not change our spirit, and it is this spirit that Tom instinctively recognises in Hatty, no matter how old she has become.