Like mitochondria, chloroplasts have their own DNA and reproduce by themselves in the cell. And like mitochondria, they very closely resemble some prokaryotes, reproducing by binary fission and having various "cell" chemistry almost identical to bacteria and unlike the equivalents in the rest of the cell. Both appear to have descended from either blundering or adventurous prokaryotes that invaded or were eaten by the ancestral eukaryotic cell, and both cells found a way to adapt to that state. Many of the smaller cell's genes migrated into the nucleus leaving only a skeleton genome behind, and now neither can survive without the other.
Interestingly, there are several living species of single-celled organisms that represent actual intermediate steps in this process, including one that has to catch and retain cyanobacteria to serve as its chloroplasts.
This is called endosymbiotic theory, and a similar one (viral eukaryogenesis) postulates that the nucleus is derived from a large DNA virus that invaded an archaean cell and assumed total control.
__________________
| (• ◡•)| (❍ᴥ❍ʋ)
|