Laymen may not be aware of this but patent "prosecution" work (as filing the patent and interacting with the patent office to get it allowed, is called) is fairly fungible, low-dollar work, compared to other types of IP. To prepare and file a patent application, the patent attorney might charge anywhere from $7k to $15k or more. But patent litigation is much more lucrative (or can be), since the lawyers can get a cut of, or be paid based on the hopes of, multil-million or billion dollar judgments.
Patent lawyers also are often called on to prepare patent opinions. The good thing about these is they are more lucrative than patent prosecution--the attorney can often charge a good $25k or more to prepare one--and they can be completely libertarian. The typical usage is this. Company A is minding its own business and then becomes aware of a patent owned by company B that they are accused of, or otherwise concerned that they might be, infringing by selling a certain product that. Quite often the issue is not clear cut--the patent language is ambiguous and there are a variety of possible legal defenses one might have, that might or might not succeed at trial. If the risk seems high and the product is not important, the company may (a) design around the patent--that is, modify the product's design so that it doesn't infringe the patent; (b) stop making the product; (c) approach the patentee for a possible license. If the risk is low or the product is essential, sometimes there is option (d): keep making the product and pray that you are not sued. Option (c), designing around, sometimes employs an opinion of an attorney that the new design doesn't infringe, or relies on input from patent attorneys as to how to increase the chance that the new design doesn't infringe.
But when option (d) is invoked, then here is the dilemma companies face. If you go to trial, and lose, you may have to pay damages for past infringement--some kind of "reasonable royalty"; and the patentee may be able to get an injunction to force you to stop making the product going forward (which may result in a license with a royalty provision). However, the patent statute also provides for enhanced damages--"the court may increase the damages up to three times the amount found or assessed", in certain cases--which the courts have found to be cases of "willful infringement".
Now, the courts hold that if you get an unbiased opinion from a professional that says you do not infringe the patent, and you rely on this, then even if you lose at trial (and the attorney turns out to have been wrong), then you have a good argument that, although (it turns out) you were infringing, it was not willful since you "sincerely" believed (hoped) that you were not infringing, because you were "relying" on an attorney's opinion.
Thus, when patent litigation is threatened or a possibility, the potential infringer will often pay patent attorneys tens of thousands of dollars to exhaustively research the problem patent(s), and to prepare an opinion that "concludes that the patent is invalid, unenforceable, and/or not infringed." (One of the most recent cases on this is the Seagate case (discussed here), which reduces but does not eliminate the need for such opinions.)
In other words, potential patent victims are so desperate to keep selling their product, that they in effect pay tens of thousands of dollars to get a patent opinion that buys them "insurance"--it basically reduces the risk of treble damages being awarded in the event they lose at trial.
Anyway--I can't see any possible libertarian argument that preparing such a purely defensive opinion is unlibertarian. Indeed, it's heroic, much like income tax defense or criminal defense work.
[Against Monopoly cross-post]