Not sure why a patent is a better guard against a lawsuit than clear prior art. If everyone knows you'll win if sued it doesn't matter if the reason you would win is because you hold the patent or if you demonstrated prior art.
I think the actual advantage is "mutually assured destruction"; big companies accumulate large patent portfolios so that they can (among other things) have enough stuff patented that they have the option to counter sue or if they get sued they can find some way that the suing company is violating something else in their portfolio and threaten to sue over that.
I live in a different jurisdiction, but based on what I've read on these discussions in the Internet, it appears that in the USA the loser doesn't pay the winner's court and lawyer costs. Having a stronger defense could allow the court case to finish on an earlier step, saving a large amount of the costs.