You are right and it probably wasn’t cheap, but at least comparable to the cost of going to court. If you have two options that cost around the same, but one will give you an immediate out, it’s likely you want to take the immediate out rather than taking additional risk for a what if.
On a side note, I know someone who’s company got sued, then when the lawyers came to the table to negotiate, they showed him a list of other companies that had previously settled with them and the amounts they had settled for. He said the lawyers had clearly done their homework in terms of estimating how much it would cost the company to go to court and the proposed settlement amount was within 10-15% of that estimate. He decided to settle.