The best response is: They used to be free-living prokaryotes that functioned as unicellular organisms.
Mitochondria and chloroplasts are thought to have originated from free-living prokaryotic organisms through a process called endosymbiosis. This historical relationship explains why they have their own DNA, which is similar to bacterial DNA, and allows them to replicate independently from the nuclear DNA of the host cell.