Sure, there's such a thing as market failure
Much as it pains to admit it there really is something called market failure. Markets are not perfect - only very good. We would note that most of what people call market failures - say Lord Stern's argument that climate change is the largest such ever - are not in fact failures at all. They are absences. Markets don't deal with externalities, whether positive or negative, because as that word externality implies, they are outside markets.
But even given that it is true that markets are not the appropriate solution to everything. However, we also need to know that there's such a thing as government failure. It's no good our shouting that markets have failed thus that bloke with a Third in PPE from Gradgrind Poly must know how to deal with it. It's possible that there simply isn't a solution to the problem. It's also entirely possible that government will be worse at whatever the task is:
The SNP has admitted that the new IT system set up to deliver common agricultural policy (Cap) payments to farmers is “not there yet”.
Fergus Ewing, rural economy secretary, told MSPs that arrangements for the payment of 2016 subsidies were “not risk-free” as he announced that eligible farmers and crofters would be able to apply for a loan of up to 80 per cent of the value of their entitlement.
Mr Ewing confirmed that by last Friday 17,744 out of 18,479 eligible businesses had received their 2015 payments, with “the majority of outstanding cases” expected to be paid by the October 15 deadline.
The traditional measure of competence is the ability to organise a piss up in a brewery. Here we have government unable to give away free money - not even rising to that modest measure, is it?
Markets might not be able to solve every problem in this vale of tears that is human existence: but it's remarkable how few of them government is able to deal with.