I wonder if there was any medical evidence to confirm his claim to be suffering a heart condition that means he could die at any moment.
If so, so what?
Most of these conditions respond well to resuscitation (indeed, they're just about the only causes of cardiac arrest who ever respond to cardiac resuscitation).
If he collapses in a bedsit, he'll die. If he collapses in prison there's a fighting chance that someone will notice and he'll be resuscitated. So prison is clearly the best place for him.