Final answer:
The purpose of negative selection in the thymus is to eliminate autoreactive thymocytes, thereby preventing autoimmune diseases by only allowing T cells that correctly recognize foreign antigens to survive.
Step-by-step explanation:
The function of negative selection of thymocytes in the thymus is to eliminate autoreactive thymocytes. Negative selection is a crucial part of the thymic selection process, which ensures that T cells do not attack the body's own tissues, thus preventing autoimmune diseases. It involves the induction of apoptosis in thymocytes that react to self-antigens presented by antigen-presenting cells (APCs). This process ensures that the only T cells that survive are the ones that can recognize foreign antigens presented by the body's major histocompatibility complex (MHC) molecules without reacting to self-antigens.