software licensing open-source-software
Why do some licenses have a clause stating that one can&#39;t violate the law?
<p>Example of such a clause in the <a href="https://huggingface.co/spaces/CompVis/stable-diffusion-license" rel="noreferrer">Creative MLOpen RAIL-M dated August 22, 2022</a> used by <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" rel="noreferrer">runwayml/stable-diffusion-v1-5</a>:</p>
<blockquote>
<p>You agree not to use the Model or Derivatives of the Model:</p>
<ul>
<li>In any way that violates any applicable national, federal, state, local or international law or regulation.</li>
</ul>
</blockquote>
<p>I don't see the point of that clause. I.e., I don't see what would change if the clause were to be deleted. Why do some licenses have a clause stating that one can't violate the law?</p>

<h2>Because breaking the law is not breach of contract</h2>
<p>(Necessarily).</p>
<p>Were you to use the model to 3D-print a gun and rob banks with it, without this clause, you have not broken the contract. That would mean that the provider could neither sue you for any damages the use of their model in your crime spree might have caused them, nor can they legally terminate the licence with you.</p>

<blockquote>
<p>I don't see the point of that clause</p>
</blockquote>
<p>The point is to add a legal disclaimer in case someone uses the open source model for nefarious purposes. It's there for the same reason <code>This software is provided as-is</code> is included in all software licenses - it's a legal statement designed to avoid legal liability from the use of your program by others.</p>
<p>@DaleM mentions &quot;breach of contract&quot; as a possible reason but it's extremely unlikely anyone, anywhere will be able to recover damages as a result of misusing one's open source model. The real reason is to protect the author of the model, not to sue anyone for damages.</p>

<p>Perhaps, this would protect the company from being sued.  Take a flamethrower, for example. If you burn someone's house down, that person might sue you and the flamethrower's manufacturer.</p>
<p>They could say to the manufacturer this framethrower is dangerous! How come you make such a dangerous product?  You give us money, also.</p>
<p>The manufacturer can just say, hey we had a contract with him saying he wouldn't do crime with it.  Not did we warn him not to burn your house down, we even made him sign a contract saying, he wouldn't do it.  What do you want from us? It's just him.</p>

<p>In some jurisdictions (<a href="https://www.gesetze-im-internet.de/englisch_stgb/englisch_stgb.html#p1962" rel="nofollow noreferrer">Germany, for example</a>) it can be illegal to create software that is intended for computer sabotage and other illegal purposes. Writing into the license agreement that using the software for illegal purposes is specifically not allowed could be in preparation of a legal defense against an accusation that the software was provided for the purpose of doing something illegal with it.</p>

<p>I think of two main reasons. The first one is to avoid liability for third party users breaking the law or causing damages using the licensed product. The second one is that the author of the product has moral rights over it and can prohibit anything he wants about its use. Of course it's not always easy to enforce that, but it's there at least.</p>
