Do you think the purpose of prison is primarily to rehabilitate prisoners into society or to give just, deserved punishment for offenses to society?
If you agree with the former, then making conditions better than the legal baseline could humanize the prison population and increase their chances and motivation to reassimilate themselves into society.
If you agree with the latter, then I don't see a good argument for bettering the conditions of prisoners.
From a basic utilitarian standpoint, it seems very clear that policy guided by the the rehabilitation principle will result in better outcomes than policy guided by the punishment principles.
I agree with neither of your false dichotomy points. The purpose of prison, first and foremost, is to protect society from people who are dangerous.
Rehabilitation is secondary to that.
Additionally it is important to call out that humane does not mean nice or pleasant. Prison does not need to be cruel. But it should absolutely not be something that people enjoy, because then you create perverse incentives.