In the production of energy from fats, this is one of the enzymes that catalyzes the last step of the mitochondrial beta-oxidation pathway, an aerobic process breaking down fatty acids into acetyl-CoA (Probable). Using free coenzyme A/CoA, catalyzes the thiolytic cleavage of medium- to long-chain unbranched 3-oxoacyl-CoAs into acetyl-CoA and a fatty acyl-CoA shortened by two carbon atoms (Probable). Also catalyzes the condensation of two acetyl-CoA molecules into acetoacetyl-CoA and could be involved in the production of ketone bodies (Probable). Also displays hydrolase activity on various fatty acyl-CoAs (PubMed:25478839). Thereby, could be responsible for the production of acetate in a side reaction to beta-oxidation (Probable). Abolishes BNIP3-mediated apoptosis and mitochondrial damage (PubMed:18371312).