In The Matrix, humans were used as batteries. The energy requirements needed by a body to sustain itself outweigh feeding it to extract energy. It would've been more efficient to burn the food directly instead of feeding it to people.
That's really interesting but I think that suffers from a similar issue because I'd assume the processing power needed to run the matrix alone would be much greater than 1:1 per human.
Originally it was humans being used for their brains as processing units, but they thought thatd be too confusing for audiences so they went with batteries.