Question: why mitochondria and chloroplasts have their own genetic material?
Answer: Mitochondria and chloroplasts have their own DNA genomes because they are descendants of prokaryotes that were taken up into eukaryotes a long time ago and became endosymbionts. They brought advantages to the eukaryotic host cell, such as photosynthesis and / or ATP energy generation.