Complex sentence: It serves to diversify the receptors the immune system uses to recognize foreign elements (antigens), and allows the immune system to adapt its response to new threats during the lifetime of an organism.
Split into simpler sentences: It serves to diversify the receptors the immune system uses to recognise foreign elements (antigens). It allows the immune system to adapt its response to new threats during the lifetime of an organism.