You're likely correct that there is no explicit legal requirement.
However (as I understand it), it stems from the implied requirement that derives from the fact that a company's directors have a fiduciary duty to act in good faith in the interests of the company.
People who agree with the implied requirement argue that "in the interests of the company" equates to "for the benefit of its members". And so you then ask yourself who are "its members" and that's where you end up at "its shareholders".
I believe in the jargon, this is referred to as "the common law approach of shareholder primacy".
Going back to the "legal requirement" front, there is, for example s172(1) of the Companies Act 2006[1], which starts by saying:
"A director of a company must act in the way he considers, in good faith, would be most likely to promote the success of the company for the benefit of its members as a whole, and in doing so have regard (amongst other matters) to—"
So "must" is in the context of "benefit of its members as a whole", and a director is "only" required to "have regard" for other stakeholders that the legislation lists in (a)–(f). Its a bit of a word-salad, but effectively appears to re-enforce shareholder primacy.Anyway, the next sections makes it explicit that shareholder primacy isn’t required:
2)Where or to the extent that the purposes of the company consist of or include purposes other than the benefit of its members, subsection (1) has effect as if the reference to promoting the success of the company for the benefit of its members were to achieving those purposes.
(3)The duty imposed by this section has effect subject to any enactment or rule of law requiring directors, in certain circumstances, to consider or act in the interests of creditors of the company.
Shareholder primacy instead stems from shareholders being able to fire management.
But what I would say is, in relation to (2) that you highlight, that "purposes of a company" means that defined in its Articles of Association as created when it the company was formed (and as later amended if that is the case).
So I would argue (2) doesn't apply to the majority of companies, many of whom are likely operating off template Articles without expanded purpose definitions.
In relation to (3), interests of creditors, this was brought before the Supreme Court in recent history[1]. My reading of the summary of the judgement would suggest there is a relatively narrow window for being mandated vs "have regard", in particular:
"All members of the Court agree that AWA’s directors were not at the relevant time under a duty to consider, or to act in accordance with, the interests of creditors"
[1] https://www.supremecourt.uk/press-summary/uksc-2019-0046.htm...