Some ancient eukaryote swallowed a photosynthesizing bacteria and became a sunlight gathering alga. Millions of years later one of these algae was devoured by a second eukaryote. This new host gutted the alga, casting away its nucleus and its mitochondria, keeping only the chloroplast. That thief of a thief was the ancestor or Plasmodium and Toxoplasma. And this Russian-doll sequence of events explains why you can cure malaria with an antibiotic that kills bacteria: because Plasmodium has a former bacterium inside it doing some vital business.