Malaria cells have plastids homologous to chloroplasts
"We now recognize that this large group of parasites had a photosynthetic ancestry and were converted into parasitism early in the evolution of animals."
What!
so this paper gives more context... ok first of all did you know that coral photosynthesize?? I didn't know that... but the way they do that is intracellular endosymbiotic uh protists or algae or whatever. The branch of parasites that malaria is from, plasmodium, their closest relatives seem to be these endosymbionts in coral. So we can guess that a long time ago the ancestors of plasmodium weren't parasitic, they were an endosymbiont in a photosynthesizing animal like coral