We have a full-time and fully-staffed team comprising developers, designers, user researchers, product/project managers etc. focussed purely on this piece of work.
In our role working to deliver health content to the general public we take very seriously the need for our content to be accessible to users and we invest accordingly. This frontend library is something we hope to push to other healthcare providers as part of a wider drive towards standards adoption.
None of this work has come cheap, but in the public sector we work to very strict budgets (and some would say lower pay) and I would say the public are getting very good value for money here. (We are judged by and required to provide proof of "benefits realisation".)
NHS Digital's procurement processes are tight and focused. They have an expert in-house team of developers and delivery managers, and they only used us on where we could accelerate the project.
As a business owner, I would have liked a bigger contract. As a tax-payer and frequent user of the NHS, I'm very happy with their efficiency.
For people who don't know the NHS budget is approx £130bn (~$165bn US), they are a huge organisation that provides healthcare to 66 million people.
It's impressive.
The cost to build something in the private sector is almost always cheaper than asking government employees to do it. The public sector "didn't build it" like you said, but if they had, it would have been cheaper. This is almost always the case.
(I worked to set up a UK public sector website back in 2004/05. We cut our costs by 90% - genuinely, 90% - by bringing all development in-house rather than using private sector contractors. I do not believe your assertions to be consistently true in the UK.)
In the private sector, shareholders take money out of the system in the form of profit. Something that costs £X in labour and consumables must be charged at £X+Y% in order to make that happen and still give money to investors. If they can do it cheaper, they still charge £X+Y%, and give the surplus to the shareholders.
In the public sector, there is no shareholder. If it costs £X in labour and consumables, then the cost to the public purse is £X. If they manage to do it cheaper, then that money remains in the system and can be used to either improve the offering, or subsidise another project.
Public sector workers are also often paid considerably less than their private sector peers, and departments are often highly restricted in their ability to pay market rates for specialist employees.
Although the total benefits package for public sector workers has historically been equal to or better than their private sector peers, this has typically been due to Final Salary pensions, which have been mostly phased out in favour of Career Average or even Defined Contribution pensions, all without a corresponding increase in salary.