For reference only, backwards reasoning is deciding the best outcome then coming up with a framework to justify it.
Just the way their judgement is framed on the identity of the cake buyer being irrelevant - even though in reality it’s highly unlikely that any other cake buyer would buy said cake, so in that sense it is relevant.
I think the outcome is correct but it’s always interesting to see how they get there. I’m sure they could have decided the other way using other similarly phrased methods.
Reminds me of a silly case (with a silly outcome): a landlord painted some steps with unsuitable paint and someone stepped on the slippery when wet paint and tragically fall to their death. The whole case was framed around the landlord failing to keep the property in good repair so as not to be ‘defective’. The judge decided that occupiers liability was not relevant because landlords liability was set out in a different statute, and because parliament had framed that statute in terms of repair all liability stemming must be from repair, and not decoration (I.e. painting). So the landlord wasn’t liable. I’m not sure whether that got over tuned later but I hope so!! Utterly ridiculous.