White and Asian men, who account for the majority of jobs at tech firms, say they’re more unfairly managed than men of other races.

People quit their jobs for a variety of reasons: a better opportunity elsewhere, a life change, a move out of state. Among those at high-paying U.S. technology companies, the most common reason is a sense of being unfairly treated, according to a study published Thursday.

Although tech jobs tend to offer flexibility, office perks, competitive pay and benefits, workers often said they left their previous job because they experienced unfair treatment. The reasons included being passed over for promotions or dealing with cliques or condescending coworkers, according to the study from the Kapor Center for Social Impact, a group focused on diversity and inclusion in tech.

White and Asian men, who account for the majority of jobs at tech firms, were more likely than men of other backgrounds to feel they were unfairly managed. Their complaints were mostly aimed at what they described as poor leadership. Black and Latino people reported a different problem. They were almost twice as likely as white or Asian workers to say they experienced stereotyping, the study found.

Silicon Valley's biggest companies have spent recent years highlighting efforts to recruit and hire more women and workers from other underrepresented demographics. But they've been reluctant to talk about who leaves their companies, even though it can be a better indicator of corporate culture.

Race and gender have connections to how workers feel about their jobs and whether they'll stick around, the study found. Women were more likely than men to experience or observe unfair treatment in the workplace. Black and Latina women were most likely to report that they had been passed over for a promotion, whereas more white and Asian women said colleagues took or received credit for their work.

Exclusive insights on technology around the world. Get Fully Charged, from Bloomberg Technology.

Allison Scott, chief research officer at the Oakland, California-based Kapor Center and the study's lead author, said she wanted to fill in gaps that tech companies aren't reporting publicly. "We've all been hearing these anecdotes, newspaper articles and Medium posts about what individuals have been experiencing in tech," she said. "We're trying to understand: Are those anecdotes representative of a larger systemic problem?"

The Kapor Center worked with the Harris Poll to survey about 2,000 adults across the U.S. who had left a tech job voluntarily in the past three years. During the research process, which took about a year, they talked to technical workers at non-tech companies as well as workers of all kinds at tech companies.

The study tried to put the issue in terms that should capture corporate chiefs' attention: It estimated that departing workers cost companies $16 billion a year. Scott said: "There's a pretty hefty financial burden that's associated with continual churn."