Because those people were able to legally do some of those jobs, but SpaceX
chose not to consider them because it would be more administration/bureaucracy for SpaceX. Ergo, discriminating on the basis of their status.
It was the same with disabilities, leading to the creation of the ADA. Companies would argue that they shouldn't have to hire someone in a wheelchair because it would cost them money to build wheelchair ramps and other accessibility aids.