Who said anything about OpenAI passing laws? (Where did that come from?)
Civilians are allowed to put conditions on working for, or supplying, the DoD or any governmental customer.
Tremendous good comes from those that are not willing to facilitate harms, simply because they are legal.
Equating legal with ethical or safe, makes no sense. [0]
[0] All of human history.