My headcanon for The Matrix's "humans are batteries" is that it's the machines' perverse interpretation of this
killing the humans is off the table, and for whatever reason letting them live with no purpose to serve the machines is also disallowed. But giving their lives "meaning" in the form of a shitty (and thermodynamically dubious) "battery" somehow satisfies the rules.
It's a very big stretch, I'll admit...