Natural life cycle
It's pretty obvious that the gender change is part of the TLs natural life cycle. Like many creatures here on earth (e.g. Slipper Limpets) they spend many years as males impregnating as many females as possible and then turn into females and breed some more.