A government must pass a law prohibiting discrimination against a particular class of people to create a new protected class. Employers decide what qualifications are necessary for their jobs. You must then prove that you were at least as qualified as a successful applicant who is not in the protected class. You can do this by comparing the resume of the least qualified successful applicant to your qualifications. If the employer says it requires a 12th grade education, but in fact has hired someone outside of the protected class who only made it through 10th grade, a court will treat a 10th grade education as the employer's actual qualification requirement.
Few employers admit that they discriminate against applicants or employees.
Experience shows, however, that employers still leave plenty of discrimination fingerprints. Other cases of discrimination. Better treatment of people outside of the protected class who have equal or lesser qualifications. If the decision looks suspicious, ask the decision-maker for an explanation. If the explanation is bogus, add it to your arsenal of evidence.