Punishments are generally so harsh because it is considered fraud. The defendants were selling software that didn't work. They either knew it did not work, in which case it is pretty much straightforward fraud, and God help them if someone dies. Alternatively, they did not know that the software did not work. In which case they committed fraud when they represented themselves to the health care organization that purchased the device as being qualified to make a determination as to the efficacy of the software or device. Again, God help them if someone dies.
But all of that is really beside the point.
The fact is that in order to get your software FDA approved you signed off on literally thousands of legally binding sheets of paper. The short version of these sheets of paper is that you guarantee, for instance, that the software ran an 8bit lut through a 10bit colorspace so that the full range of that 10bit colorspace would be visible in the 8bit window at one time or another. That is actually a fairly standard guarantee that medical software makers have to give. If your software does not give the appropriate contrast at a given setting, then the FDA knows that you and whoever else signed that sheet of paper lied. You could not have tested it for all values. This is fraud.
Or let's say your software flips images left for right. You guessed it, there is a slip of paper you and a lot of other people sign indicating that your software will not do that. You also gave that slip of paper to the FDA to get FDA approval. Later some poor nurse somewhere is prepping the left leg for amputation instead of the right one. The doctor cross checks with the FDA approved software, and verifies that the problem is in the left leg. And . . . do you see where this is going? This too is fraud. And it is criminal in the United States. You WILL be prosecuted.