Imagine you're the mayor. You want to hire companies to build prime housing and affordable housing. Every company only wants to build prime housing, because that's where the money is. If you only give out contracts like that, basically nobody will apply to build affordable housing.
You're not dumb, of course, so your next step is to say, "if I give you the contract to build prime housing, you also must build affordable housing". That's not ideal for the developer, because the time spent on building affordable housing is time they don't spend on stuff where they make proper money, but at least they can make some money. They agree to take the deal. You think, problem solved, but turns out the developer outsmarts you: they structure the company in a way that they can chicken out of building the affordable housing. In real estate, it's very common to have every building project be its own limited liability company so that one failed project doesn't influence the others. In this case, you put the affordable and the luxury housing together in one Ltd, build the luxury housing, extract the profits by moving them to the parent company and then declare your Ltd bankrupt, meaning they unfortunately can no longer build the affordable housing.
As a mayor, you observe how you're being cheated, you get real angry but the walk through the courts is too slow, and your voters demand action now. Realistically, you do the court route in the background, but you learned your lesson and now you tell the developer "before I give you a high margin luxury contract, you must have completed affordable housing first".
Alternatively, you mix the buildout into the same building so that you cannot open the luxury flats/office space without having completed the affordable part. Either way, affordable first, luxury second.
That is basically the story of the London property market.