When they remove the donor heart, the donor's body will die no matter what. How did you think a heart transplant worked? That's why, as others have said, it's only done when the donor is already legally and medically dead, even though their heart is beating.
It is technically possible to artificially keep the heart beating during the transplant process, but that's a very recent technical development and a much more difficult surgical procedure. So stopping the heart first is normal.
It is technically possible to artificially keep the heart beating during the transplant process, but that's a very recent technical development and a much more difficult surgical procedure. So stopping the heart first is normal.