I don’t know for sure what the average discount that Motability gets off new cars, but based on what an individual can negotiate buying just one car, and on the reasonable assumption that with the volumes that Motability buy it will be significantly more, I suspect that it’s a minimum of 20% discount and probably more like 30% with EVs. Then you add to that the 20% VAT exemption. On that basis, at the 3 year point, Motability can probably recover almost their entire purchase price and, in some cases more, even disposing of cars via auction.
Extensions beyond 3 years are profit generative for Motability, as they still demand the sacrificing of the full higher rate mobility benefit (£4k a year) but, as @Mark says, it’s in their interest to keep the flow of new car orders up, as they make a healthy profit on each and every lease. This is also why the prices to buy at end of lease (when this was possible) were always way too high for a car sold with no warranty. They wanted to deter people from doing this so as to keep people in the scheme.