Something surprising that a couple lawyers have drilled into me: you can be sued for anything, regardless of whether it's illegal or not. The lawsuit is the discovery & decision process by which the courts decide whether your personal circumstances make it illegal. If the law is blatantly on your side you can get the lawsuit thrown out, but you still have to defend yourself, which includes the expense of hiring a lawyer.
A corollary (and probably what the lawyers were getting at): not making yourself a target is more valuable than actually following the law. If you have money, keep it to yourself - some more unscrupulous actors will find some legal grey area you're operating in and sue you for it simply so they can force a settlement and get some of it. If you're doing something interesting (whether it's legal or not), keep it to yourself. If your interests are not aligned with someone else, gosh darnit, don't tell them or otherwise bring yourself to their attention. There is probably some lawsuit they can bring that would at least force an expensive court case and legal defense and make you want to settle to make it all go away.
And once you are a target anyway, follow the law scrupulously. This is why big corporations invest billions in legal & compliance departments.
A corollary (and probably what the lawyers were getting at): not making yourself a target is more valuable than actually following the law. If you have money, keep it to yourself - some more unscrupulous actors will find some legal grey area you're operating in and sue you for it simply so they can force a settlement and get some of it. If you're doing something interesting (whether it's legal or not), keep it to yourself. If your interests are not aligned with someone else, gosh darnit, don't tell them or otherwise bring yourself to their attention. There is probably some lawsuit they can bring that would at least force an expensive court case and legal defense and make you want to settle to make it all go away.
And once you are a target anyway, follow the law scrupulously. This is why big corporations invest billions in legal & compliance departments.