Why do all living plant cells have mitochondria?
Well, the primary function is ATP production (chemical energy source), why, or how they got them is a far bigger question, one popular theory is that organelles were at one point cells in their own right, which were consumed (or assimilated) by another carnivorous cell and over time these cells had a greater ability to survive, reproduce incorporate this new cell into it’s cellular division and pass it onto it’s daughter cells.