Why does endosymbiosis occur?
Usually when one organism is inadvertently ingested by another and it turns out to be beneficial for both.
A prominent theory explaining the mitochondria being a part of eukaryotic cells is endosymbiosis. The reason why this may have happened probably starts with a cell ingesting the mitochondria. This probably started out as a regular mutualistic relationship, since the cell provided nutrients for the mitochondria and it performed cellular respiration in return.
If the theory is true, the reason the mitochondria became a part of the eukaryotic cell completely is because it would multiply and, simply because of the natural process of cell division, the two daughter cells would each end up with mitochondria. This simply became more and more permanent as eukaryotic cells evolved with mitochondria.
Another example that is less overtly endosymbiosis is the bacteria that reside in the human stomach and digestive tract. There are over 600 species, and without them, we would die, but they are obviously not present when humans are zygotes, We gain the bacteria probably partially as fetuses through the umbilical cord and when we are infants.
I discussed more of the "how" and less of the "why," but the short answer to your exact question is convenience. Mitochondria and eukaryotic cells underwent endosymbiosis out of mutual benefit (assuming the theory is correct, which we cannot completely prove).