While no law can prevent a company from doing so, it is illegal to fire, demote, harass, or otherwise “retaliate” against applicants and employees who report sexual harassment. The reporting includes complaining to Human Resources, complaining to a supervisor, filing a lawsuit, filing a charge with the EEOC, or participating in an employment discrimination proceeding. If a company does this, they are liable for your lost wages and possibly punitive damages.