There might be an alternative usefulness of using humans, besides using the bio-electricity or body heat for energy: They can use part of their brains (those that control stuff the people in the pods don't need) for their computational power, as a big shared network of processors.
We even have screensavers doing this job today.
By the way, if the machines are very intelligent (and it seems they really are), they also need some sorts of big accomplishments. Why do some people maintain big, complex, and beautiful aquariums, if they only needed fish for their meat they could have used more efficient ways.
However, the most logical explanation for me is, that as a highly advanced "society", they might want to refrain from genociding sentient life. Why would they want to completely drive humans to extinction? Maybe Earth is the only planet with sentient life, so why exterminate the very first sentient life-form inside this Universe / Galaxy? They might want to study our culture, our history, etc.
The Earth is rendered nearly uninhabitable after the war, by creating the Matrix, the Machines essentially saved (at least most of) humanity from extinction.