When was he assessed unfit?
His case was adjourned as the court moved towards a sentence, and the court asked for reports, including one from the Probation Service. They said he was unfit for unpaid work, and that would have been disclosed to him via his solicitor some time before the sentence. It takes a fair amount for the Probation Service to say that, but almost all their schemes involve manual effort.
It's usually mental health / public safety / precautionary principle that gets in the way here, but mobility disability or being obese or poor general health may also factor.
His solicitor - and I speculate - would have said to his client "well that is going to narrow down the sentencing options somewhat".
Now the judge here would be very well aware of how reports from the Probation Service work, and had seen the defendant in court and probably made his own judgement, only to be surprised from the hospital letter.