How could the machine in Gantz manipulate life and death?
According to gantz.wikia.com:

The black spheres known as Gantz, are objects with seemingly impossible abilities, mass produced in a factory in Germany, using alien military technology. This technology was sent to Earth by a species to help them fight off another alien species that had previously tried to invade them. Each Gantz sphere has a person inside, which the Room of Truth reveals was just a random person duplicated about to provide an interface. The alien broadcast only contained military technology, the point system and other aspects created by humans.
When [the people in the Room of Truth are] asked about souls, they were told the soul is just data, stored somewhere when they died, and would be reincarnated as someone else later on.

It seems the Gantz clones/duplicates a physical body and then uses the &quot;data&quot; of a soul from the original human to put them in the new body.