When people say that markets are efficient then they mean the notion of Pareto efficiency I provided in a previous post: An allocation is Pareto efficient if there is no other allocation that is a Pareto improvement. An allocation is a Pareto improvement over another allocation if the former is at least as good as the latter for everyone involved and strictly better for at least one person. As we saw, Pareto efficiency has nothing to do with fairness. If I have everything there is to be had in the world and I want to have all this stuff then this is Pareto efficient. Because any other allocation would require me to give up something and, as I do not like to do this, this other allocation is not a Pareto improvement because I am not as happy as before.
While some Pareto inefficient allocations may be better in terms of fairness than some Pareto efficient allocations, any Pareto inefficient allocation can, by definition, theoretically be Pareto-improved upon. If you provide a Pareto inefficient allocation, the first question is why do you not provide one that is a Pareto improvement over the one that you do provide? Economists tend to treat Pareto-efficiency as a minimal requirement for a reasonable allocation. Markets (under some conditions and if they work as we suppose) produce Pareto-efficient allocations. So markets (under some conditions of no externalities and no informational asymmetries and if they work as we suppose) satisfy this minimal requirement for providing reasonable allocations. But real lovers of markets probably believe in them for more than just the Pareto efficiency reason. No lover of markets can, however, claim that markets by themselves necessarily lead to fair allocations, however this is defined. Unless you define fairness in such a way that all most fair allocations are all Pareto-efficient allocations. I doubt that this is a reasonable definition of fairness in all contexts. It is certainly not how I would define fairness.
I still think that Pareto efficiency is important, though, for two reasons. One is that Pareto-efficiency is a property that some markets have and so we should know about if we study these markets. The other is that if we do have a Pareto inefficient allocation then: “really, why?” we can’t help asking. The third of these two reasons is of course that you should know about it because all other economists (should) know about it. So it is important for the communication between economists that we know what we talk about when we talk about Pareto efficiency or Pareto improvements.