That explanation never made any sense to me. Plenty of much easier ways for the machines to generate vastly more energy with far less hassle than using humans as “batteries”. There must be more to it than that!
The original idea wasn't batteries, so they probably started out with humans as cpus but then went with batteries to make it easier to understand for people.