During the early process of specialized immune cell development and maturation, our immune cells go through a screening and selection process that eliminates a majority of immature CD4+ or CD8+ cells (the precursors of these cells migrated from our bone marrow to the thymus during early development). In the thymus, this screening process involves apoptosis (programmed cell death) and the cells that are induced to die are generally those that target "self" or cell markers on our own cells. This is important because it prevents autoimmune responses. By adulthood, the thymus shrinks since the majority of these immature T cells have been processed and been freed from the thymus, where they relocate and maintain residence in various lymph tissues such as lymph nodes or the spleen; here they await activation by a specialized macrophages called a dendritic cells. This activation process converts a specific naive CD4+ and CD8+ cells into active/mature T helper or T Killer cells, as well as a clone of memory cells (which help induce a quicker immune response upon reactivation). Meanwhile, we still have several naive T cells that maintain residence in lympathic tissue that can remain unstimulated/activated throughout our lives.
The basic takeaway from all this is that because a majority of our naive T cells have already been freed from the thymus during the screening process, its removal in adulthood is less hazardous. For childrem this process is still on going, so in children, removal of the thymus would be very problematic and those children would have a weak immune system as a result.