The issue of sexual harassment in the workplace never really goes away, but there have been some pretty glaring examples in the last few couple of weeks. The New York Times reported how Bill O’Reilly and Fox News have paid millions to settle harassment claims. And Uber and several of its executives are in hot water for allegations the company ignored harassment complaints.

Companies spend millions on training their employees and managers how to spot, avoid and respond to sexual harassment in the workplace. In some places, organizations are required by law to offer these programs, but there are other incentives for companies to pay for the trainings.

“The biggest reason that companies do workplace harassment training is because it gives them a special legal defense when it comes to being sued,” said Marcia McCormick, a law professor at St. Louis University’s Center for Employment Law. If a company can prove it made a good-faith effort to limit harassment in the workplace, a judge or jury may limit the company’s liability when someone working there breaks the law.

Sondra Solovay is vice president of content and human resources at Workplace Answers, which provides training to companies, including online and video modules. She’s been working in the industry for more than a decade and said companies are starting to look beyond the risk mitigation.

“At first folks were really focused on just the compliance aspect,” she said. “But as time passed, savvy organizations have realized that it's not just about compliance, but it's actually about making your organization run as productively as possible.”

Workplace harassment also can be distracting and demoralizing for other employees. Hundreds of companies offer compliance programs addressing topics like sexual harassment, discrimination and workplace ethics, but the programs vary widely, and it’s not clear they actually help, according to St. Louis University’s McCormick.

“Interestingly,” she said, “there is very little empirical evidence on whether or not harassment training is successful,” citing some research indicating some types of training can actually make discrimination worse by highlighting stereotypes.

Quantifying the efficacy of these programs can also be difficult because harassment claims may go up as employees feel more emboldened to file reports.A recent Equal Employment Opportunity Commission task force called for more consistency in training.

Law Professor Elizabeth Tippett at the University of Oregon reviewed dozens of training programs as part of her research. She said even with so little to go on, employers buy the training anyway.

“It is a really strange market for services,” she said of the compliance training industry, because “in the market for these trainings, it's not necessarily about the best [training], but what's recognizable as a harassment training to the employer and to a court.”

But as the many high-profile cases have shown lately, the real issue is often corporate culture. Ingrid Fredeen is vice president and senior product manager at compliance firm Navex Global.

“We are seeing the insides of these ‘permissive cultures,’” she said. “I call them permissive because there are cultures where [they] either turn a blind eye to misconduct, or, worse yet, [they] actually condone it.”

Fredeen said 76 percent of companies provide some type of harassment training, and about a third of large firms will budget $100,000 or more to pay for it. However, she said, even the best training won’t work if management isn’t on board.

“You can do a ton of training, and you can do a ton of work internally,” she said, “But when your leadership is fundamentally challenged in that way, you're not going to ever secure that full legal defense.”