Beyond that: the "merits" of a case is unknowable. Courts don't have the "merits" in front of them. They have the evidence and arguments developed by the parties. Consider the Gawker case: did Gawker publish the video recklessly or maliciously? The "yes" or "no" answer doesn't exist in reality. It's an abstraction. The only thing that exists in reality is, e.g., various emails and communications and meetings that can lead to one conclusion or the other.
Developing that evidence--particularly within the context of a process where everyone has a strong incentive to lie and fabricate--is what makes litigation expensive. But it takes a certain amount of money to develop the evidence. Spending a lot more money than that isn't going to get you a much better result.