The fact that a third party can benefit from flaws is somewhat unique to smart contracts. However, if you or your company are party to an "unprofitable" contract, it's both legal and sensible to ask a lawyer if it can be broken. The more talented the lawyer the more options they may find for you.
Furthermore, some areas of law seem more open to "Technicalities" than others. It's hard to believe that tax structures like https://www.investopedia.com/terms/d/double-irish-with-a-dut... were part of the intent of the law, though they are compatible with the word of it. The difference between avoidance and evasion often rests on a technicality.
Finding ways to subvert the intent whilst remaining within the 'rules', is the very essence of hacking. No one said the username input couldn't contain an SQL statement?