Machines keep humans in the Matrix as they are a source of energy. Why did they make it so that when a human is hurt in the Matrix, they're bodies hurt themselves in real life (in the tank)? If a human dies in the Matrix, do they die in the real world? Or just get flushed out of their tank? Isn't it kind of a waste?
The body cannot live without the mind. The machines can't get around that. But nothing is wasted. They liquefy the dead so that they can be fed intravenously to the living.
Jump to 45 seconds for Morpheus' first hand explanation.