They don't kill people to take body parts. They execute convicted criminals, and those prisoners automatically become organ donors.
One example of the potential moral hazard is that maybe there's some corruption (maybe there's some profit being made, and judges could get kickbacks on the number of times they execute prisoners).