The headline is seriously misleading, the energy comes from sunlight which is used to split water into hydrogen. And the bacteria use the hydrogen as an energy source to create biomass from CO2. That biomass is mostly in burnable fuel.
The article is very interesting, but the headline makes it sound like a fundamental misunderstanding of thermodynamics.