In To Kill a Mockingbird, why do you think that Jeremy spends so much of his time in his treehouse?
In Chapter 3, Jem spends an entire day in the treehouse because Atticus had read a story of a man who sat on top of a flagpole for no apparent reason. It is possible that Jem was testing or trying out his own growing feelings of independence.
In Chapter 5, Jem and Dill spend time in the treehouse without Scout. This is a time when Dill is more interested in what Jem is doing because Jem is an older male role model, like an older brother. Once again, for Jem, this distancing between himself and Scout is a result of his approaching adolescence.
By Chapter 15, Scout notes that Jem had outgrown the treehouse. In all of these instances, Jem uses the treehouse as a childish escape, as a place of independence, and finally he avoids it as a sign of maturation.