Symbiosis
Almost for certain, this happened to form the eukaryote cell. That's the type of cell all animals and plants are made of. The organelles inside the cell, such as mitochondria and chloroplasts, contain some DNA. This DNA is the remnant of a once separate bacterium. The theory is that the eukaryote cell evolved by the fusion of several bacteria or archaea organisms.