This is a pretty weird way to look at it. I would have thought it went more like this: opposing lawyers come up with some clever arguments to oppose your claim. One of them, I take it, was that the signatures on the petition were not valid because the word "certify" did not appear. Because the lawyers on the other side made this argument, your lawyers had to respond to it to reduce the chances that you would lose the case. Presumably the judge did not rule on that particular question because you wound up losing the case on some other ground (or settling). Is that right?
I should also add: I'm not here to argue that lawyers are always good at their jobs and that they always give issues the attention they deserve (no more and no less). This sort of risk assessment is a big part of the job, and it's not always easy. And when there is a lot of money involved, it can be rational to spend a lot of money to address relatively small risks. It could also have been that the certification question was a stupid one that your lawyers should only have spent an hour or two on. But instead, through poor judgment or something else, chose to go waaaay down the rabbit hole. I have no idea. But these things do happen. Lawyers are people, after all. One particular set of lawyers' poor judgment (if that is indeed what actually happened) is not a deep flaw in our legal system.
(By the way: what does the Constitutional "Right to Petition" have to do with any of this? I hope you don't think it has anything to do with your shareholder petition case, since the Constitution only protects your right to "petition the GOVERNMENT for a redress of grievances." It doesn't protect your right to bring a shareholder petition, and it most certainly does not protect your right to win every lawsuit that you think you're entitled to win.)