On the other, those laws might not outlaw advertising the job in a particular way that discourages certain applicants, and an employer might be able to find other reasons why not to hire someone who doesn't match
the desired citizenship status; it could be hard to prove that national origin was the sole reason and hard to say that any specific person was significantly and provably directly harmed as a result.