In principle that doesn't bother me.
If you have a young person who could survive for years without, vs a 60 year old that wouldnt last a week, the immediacy of the need is obviously an important factor.
My understanding is that the NHS cannot deny treatment solely on age, but can give preference based on long-term benefit (where age is relevant).
I'm sure everyone would have their own views on individual cases and overall policy and I'd be reluctant to be too critical of how decisions are made.
I think the general point was more that ethics and pragmatism do intertwine, to the extent that (I would say) it is unethical to not be at least partially informed by pragmatic factors, when addressing people's needs and wants (particularly when there's not enough to give everything to everyone).
I do recall that, in one of the early waves of Covid, when there weren't enough ventilators to go around, some NHS hospitals triaged, in part, on the basis of age.
Some in here would call that morally repugnant. I would disagree (though, no doubt, there is ethical complexity).
Edit - appreciate the info you share, though, its a good example of the challenges inherent in providing a social service with insufficient resources.