“H.R.’s client is the company, which means that H.R. is supposed to protect the company’s interests,” Cynthia Calvert, a discrimination lawyer and senior adviser to the Center for WorkLife Law in San Francisco, said in an email.

The Uber engineer Susan Fowler said she had seen that calculus play out firsthand when she reported inappropriate messages from her manager to human resources. The individual was deemed a “high performer” and received only a warning about his behavior, Ms. Fowler wrote in a blog post about her experience.

At best, human resources officials may be caught in a thankless bind.

“It can be very lonely being a human resources professional in an organization,” said Carol Gordon, who spent three decades as a human relations officer in the banking industry and now runs a consulting firm. “It can be very isolating and very dangerous when you get into politics and harassment situations in the workplace. You need to have a strong sense of self to have the wherewithal to do this kind of work.”

Calls for Help End in Hurt

Often employees fear that human resources will help the company lash out at the accuser rather than punish the accused.

Kamee Verdrager, an employment lawyer in New Hampshire and Massachusetts, filed a legal complaint that said her supervisors at the law firm Mintz Levin, her former employer, gave her less meaningful work and unfairly harsh performance evaluations after she spoke up about experiencing harassment and after she went on maternity leave. The firm later demoted and fired her.

Ms. Verdrager’s complaint said that the firm’s human resources department enabled retaliation against her by refusing to seek evaluations from partners who praised her work but were outside her practice group — the same group where, she said, she had been harassed and discriminated against — despite customarily considering outside evaluations.

Mintz Levin said it couldn’t comment beyond a statement it made when it settled the case last year saying the firm and Ms. Verdrager were putting the dispute behind them. Ms. Verdrager wouldn’t comment on the case.