In the Matrix books, the machines actually used the brain power of humans, rather than their energy. The makers of the movies just thought people would be too stupid to understand that.
That retcon was bizarre. There are myriad simple pretexts for enslaving humanity. Choosing "let's maintain lukewarm meat bags for energy" is so contrived and absurd.