The Humans are more than batteries. They are active memory banks, think flash drive or external hard drive.
So I've been rewatching the movies, like many it is one of my favorite trilogies to binge. I was watching with my wife the other day who is a developer and never watched them through. When morpheus explains that the if you die in the matrix you die in the real world because the body can't live without the mind. To which she said why, its a simulation why does it matter if you die there. So it made me think what makes sense, and if you think of the body in the real world as a flash drive or hardware it works quite well. If you are killed in the matrix or rather "deleted" then the hardware is now empty and you die. Same goes when switch is unplugged by Cypher, flash drives often have warnings not to unplug while actively writing as the file can be corrupted. So when you are plugged in the experience is actively being written and the brain can't handle being yanked out suddenly. This is backed up with the phone line exit so it is safe to remove the hardware.
Let me know if you like this theory. I've enjoyed connecting the movies to computer analogies its added to the fun of rewatching them.