Bizarrely venturing into a controversy in which he was not otherwise involved, President Donald Trump told reporters for the New York Times last week that Bill O’Reilly “is a good person” and that he didn’t do “anything wrong.”

The comments came on the heels of the revelation that Fox News has settled with five women who claimed O’Reilly, the Fox megastar, sexually harassed them. According to the Times, payouts to these women, who worked for him or had been guests on his show, total about $13 million. The women complained, among other things, about lewd comments and phone calls, verbal abuse, and sexual overtures that led women to believe they would risk their careers by refusing him.

Of course, it’s legally irrelevant whether Trump thinks O’Reilly is a good person. But, in an important way, O’Reilly himself is secondary to this unfolding legal story. Under federal law, women (or men) who suffer from harassment generally gain redress by suing the employer, not the individual harasser.

So this is really a story about an employer, Fox News, and its owner, 21st Century Fox — entities that may have bought themselves silence and impunity in the short term, but set themselves up for legal Armageddon in the longer term. If the women with whom the network have settled are to be believed — note that false allegations are rare, and payoffs for false allegations even rarer — serial harassers abound at Fox News. (Let’s not forget Roger Ailes, who was ousted as Fox’s CEO in 2016 amid a high-profile sexual harassment scandal.)

And sexual harassment law is not just about preventing a theoretical first case of sexual harassment, but how, once alerted to a problem, a company responds to reduce the likelihood of a second or third case. To put it mildly, Fox News does not appear to fare well on that front.

There’s something of a paradox in the Fox situation. Each woman, by settling, has effectively signed away her right to a legal determination about what happened. And Fox has managed to minimize exposure by requiring, as a condition of her employment, arbitration (rather than lawsuits) and by imposing gag orders on the women as part of the settlement. The cases went away!

But as the number of these settlements rise, and now that they’ve become public, there’s a strong chance that future plaintiffs will point to them as evidence that the network has a policy of paying off victims of harassment: They show that Fox has the very opposite of a sound anti-sexual-harassment policy. Settlements may make sense in terms of a balance sheet: O’Reilly brings in many multiples of the money that Fox pays out to his accusers. But it’s a strategy that works until it suddenly doesn’t. And when it comes crashing down, the consequences could be legally and financially disastrous.

How the law assigns responsibility in sexual harassment cases

It took a while for the Supreme Court to lay out the contours of sexual harassment law. Federal sexual harassment law falls under Title VII of the Civil Rights Act of 1964, which prohibits discrimination based on certain protected characteristics, including sex. In a 1986 case, Meritor v. Vinson, the Supreme Court held that sexual harassment is a form of intentional sex discrimination that violates Title VII, and it recognized two forms of “actionable” harassment.

Quid pro quo harassment occurs when a person with supervisory authority threatens action against a subordinate to extract some type of sexual submission — “Sleep with me or you’re fired!” But harassment can also be actionable when an employee is subjected to unwelcome sexual conduct so severe or pervasive that it creates a hostile working environment.

Importantly, individual harassers (like, allegedly, Bill O’Reilly) cannot be held liable under Title VII. They can be subject to criminal prosecution if the misconduct involves assault, battery, rape, or any other act that is criminal as well as discriminatory. And they can sometimes be sued individually under a state anti-discrimination law; Gretchen Carlson, former Fox News host, directly sued Roger Ailes, although Fox News agreed to pay for his defense. The individual supervisor can potentially also be sued under a tort law that allows recovery for invasion of privacy, infliction of emotional distress, and the like.

But by and large, sexual harassment claims are litigated by employees against employers. The crux of these cases typically involves the plaintiff trying to prove that the company can be held responsible for the behavior of someone it employs — someone who is (presumably) acting in violation of the company’s stated policies.

The Supreme Court clarified the rules on employer liability for harassment in two important cases in 1998 (Burlington Industries v. Ellerth and Faragher v. City of Boca Raton). For harassment that results in a “tangible” employment action (a version of quid pro quo harassment), it said that employers are strictly liable — meaning that the employer is responsible for the behavior, plain and simple.

When Roger Ailes was ousted, Fox News issued a statement that it would not tolerate conduct that “disrespects women or contributes to an uncomfortable work environment.” Can the company prove it in court?

But for hostile environment harassment, the rules of liability are more complicated. When a supervisor creates a hostile environment for a subordinate employee, the employer is automatically liable, but also has the chance to make an “affirmative defense.” If it can show that it has taken reasonable measures to prevent and correct the harassment problem, it might be able to avoid liability or damages.

The company doesn’t claim the harassment didn’t happen, but says that it did what any reasonable employer would have done to prevent the behavior from happening in the first place, and then responded to the problem once it did occur. (The victim is also obliged to take reasonable advantage of opportunities to minimize or avoid harm — reporting the incident to human resources, for instance.)

It’s going to be hard for Fox News to prove it took active steps to prevent a hostile work environment from developing

This is where Fox’s history of settlements — again, five of them, totaling $13 million — may come back to haunt it. What measures does a reasonable employer take to prevent and correct problems of harassment? It does the easy stuff like adopt a written policy prohibiting harassment and creating a grievance procedure for employees to file internal complaints. The employer might also train its employees, and especially its supervisors, about the law and the internal policy and about how to deal with harassment when it happens.

(It was revealed last week that, to the amazement of 21st Century Fox employees, its human resources department has been using audio of President Trump’s “grab them by the pussy” conversation in training sessions to illustrate one kind of unacceptable behavior. The choice seemed odd, given that Fox News commentators have defended Trump, and given that Trump has inserted himself into the O’Reilly situation.)

But guidelines and training sessions are not enough. Employers also must show that they have responded promptly and effectively to complaints of harassment, conducted thorough investigations, protected employees from retaliation, and taken disciplinary measures to minimize the likelihood of future problems.

We don’t know (or at least I don’t know) what happened between O’Reilly and each of those women. And the reason we don’t know is because Fox News settled the cases quietly and imposed those gag orders. Is it possible that Fox News settled these cases even though Bill O’Reilly did not do anything wrong? Sure, but it’s highly unlikely. Harassment cases are notoriously hard for plaintiffs to win — federal discrimination complainants prevail only 15 percent of the time, a lower win rate than in any other type of civil lawsuit. And employers are loath to encourage complaints by being too quick or generous with payouts.

But take a step back and look at what the picture of settlements presents of Fox’s policies for dealing with sexual harassment allegations. Even though each individual woman has effectively relinquished her claim, the lawsuits suggest a pattern of behavior by Fox News as well as by O’Reilly. Several new lawsuits have been filed, including one by former Fox News host Andrea Tantaros, which alleges that Fox News is “operated like a sex-fueled, Playboy Mansion-like cult, steeped in intimidation, indecency, and misogyny.”

How might the pattern of settlements factor into this or other lawsuits? Since arbitrators are supposed to apply the same governing law as courts, automatic liability applies. If actionable behavior by O’Reilly is deemed likely to have occurred, Fox News will have to present the affirmative defense, outlining the anti-harassment measures it has taken.

Fox News’s parent company is now investigating the claims against O’Reilly — but Fox News was obliged to do that from the start

Fox News would likely argue that the settlements mean nothing — that the payoffs were based on a decision that it would be cheaper to settle than to defend against the claim or suffer whatever bad publicity might attend such a defense. Nonetheless, after it learned of a claim, Fox News had the responsibility to investigate and determine what action was necessary to resolve it and to prevent future ones.

The burden will the therefore be on the company to prove in any case involving O’Reilly (or Ailes, for that matter) that it determined — both for that case and in the earlier ones — that no harassment occurred, or that it imposed proper disciplinary or corrective measures to minimize the risk of repeat harassment.

It strains belief to think that Fox News would pay one woman $9 million, as it did, in one case, if it concluded that her claims were unfounded. And there has been no outward evidence that O’Reilly has faced sanctions, such as suspension.

What’s more, 21st Century Fox announced just this week that it had hired a firm to investigate at least one of the claims against O’Reilly, which strongly suggests that Fox News had not done so already. Given this track record, Fox News simply won’t be able to mount the affirmative defense, causing its odds of losing to skyrocket.

Moreover, Fox News may not get away with its strategy of keeping these claims out of open court. The Equal Employment Opportunity Commission retains the power to sue an employer and seek both injunctive relief (an order, say, requiring the employer to take particular measures to deal with the problem of harassment) and victim-specific damages, even if every individual employee has agreed to mandatory arbitration of discrimination claims.

The EEOC can sue to vindicate the public’s interest in nondiscriminatory employment, and it doesn’t have to abide by employment agreements that attempt to substitute arbitration for litigation. Of course, the EEOC is under Trump’s authority, so his views of O’Reilly’s goodness may come into play after all. But politics aside, this is exactly the type of case that merits EEOC intervention.

And the kicker for Fox News is this: Employers are protected from punitive damages in harassment cases — the kind that can really hurt a big company’s bottom line — only if they can show that a supervisor’s misconduct was contrary to the employer’s good-faith efforts to comply with Title VII. (Title VII has a cap on damages, but many state anti-discrimination laws, under which these claims can also be litigated, do not.)

Fox News’s practice of settling, secreting away, and ignoring doesn’t have a prayer of satisfying this standard. And this isn’t just a problem for future complaints involving O’Reilly. In sending a message to its employees that it tolerates harassment, Fox News has made itself vulnerable to a greater likelihood of liability, compensatory damages, and punitive damages in all harassment cases involving all supervisors for the near future.

When Ailes was ousted (with his $40 million exit payout), Fox News issued a statement that it would not tolerate conduct that “disrespects women or contributes to an uncomfortable work environment.” Fine words, but can the company prove it in court?

Workplace equality is not usually best brought about by the free market. But it might be a form of rough justice that, if money kept O’Reilly in his position till now, money may eventually bring him down. In just a few days, more than a dozen companies withdrew expensive ads from The O’Reilly Factor. Still, such an outcome would be no substitute for a well-functioning, anti-discrimination law. The O’Reilly scandal is in part an indictment of our current legal system.

Employers should be able — encouraged, even — to settle harassment claims. It’s a good way to provide redress to a victim-employee who has been harmed by the harassment. But employers shouldn’t be able to use arbitration and secret settlements to protect highly paid employees with a history of harassment.

Fox News’s approach to sexual harassment complaints may well be headed toward a costly explosion.

Correction: This piece originally incorrectly characterized the Fox News settlements. Fox News has indeed reached settlements with five women, but not all the complaints involved lawsuits. Also, it was 21st Century Fox, the parent company — not Fox News — that this week commissioned an investigation of a claim against O’Reilly.

Joanna L. Grossman is the Ellen K. Solender Endowed Chair in Women and Law at SMU Dedman School of Law. Her most recent book is Nine to Five: How Gender, Sex, and Sexuality Continue to Define the American Workplace. She is a regular columnist for Justia’s Verdict.

The Big Idea is Vox’s home for smart discussion of the most important issues and ideas in politics, science, and culture — typically by outside contributors. If you have an idea for a piece, pitch us at thebigidea@vox.com.