Because they have evolved to spawn when their water levels shrink and just before the dry season their eggs hatch out when the rains come and the fish are there to eat the millions of Mosquito larvae and other insect larvae that breed in the wet season.