Mitochondria are very similar to bacteria and are thought to have originated from bacteria. This points you to the answer: bacteria produce ATPs the same way mitochondria do, with the oxidation machinery place in their plasma membrane (analogous to the mitochondrial membrane).