We're all living in a computer generated conscious within Red Sector. When you get stamped, you're actually passing out and being taken into the Grid. Once in there you begin to live life out through an entirely simulated experience that is monitored by the corporate giants. Your body heat is turned into energy which is, in turn, used to generate electricity. Considering your mind thinks you are doing it all, the body is made to react in kind, generating huge amounts of energy. This heat energy is syphoned off to create green electricity, which in turn powers the machines that create and sell tech back to those who are living in the flesh.
Of course to make sure its legal you are all illegal immigrants that get paid a wage by this corporation. Conveniently you spend all that wage in the generated world which belongs to a single mega corp. If you happen to get killed, your memory is wiped and your left outside the city. Welcome to purgatory.