But "the algorithm was sexist, not me" is probably going to be a losing argument in any court case.
[1] Well, not entirely, but that's another can of worms.
Edited for clarity
> The laws enforced by EEOC prohibit an employer or other covered entity from using neutral employment policies and practices that have a disproportionately negative effect on applicants or employees of a particular race, color, religion, sex (including gender identity, sexual orientation, and pregnancy), or national origin, or on an individual with a disability or class of individuals with disabilities, if the polices or practices at issue are not job-related and necessary to the operation of the business. [0]