By Julia Horowitz, CNN Business

Tesla has been kicked out of the S&P 500 index that highlights companies that prioritize environmental, social and governance — or “ESG” — issues. CEO Elon Musk is not happy about it.

“ESG is a scam,” he tweeted. “It has been weaponized by phony social justice warriors.”

Step back: S&P Dow Jones Indices said in a blog post that Tesla’s ESG standing had been affected by claims of racial discrimination and poor working conditions at its Fremont manufacturing plant.

The automaker’s handling of an investigation by the National Highway Traffic Safety Administration into fatal crashes involving its Autopilot technology has also been called into question.

“While Tesla may be playing its part in taking fuel-powered cars off the road, it has fallen behind its peers when examined through a wider ESG lens,” Margaret Dorn, the executive in charge of ESG indexes for North America, wrote in a blog post.

Ride ’em, Elon! Tesla celebrates opening of Texas gigafactory

My thinking: The claims made against Tesla in a lawsuit from the state of California are shocking. The Department of Fair Employment and Housing said it found evidence that the Fremont factory “is a racially segregated workplace where Black workers are subjected to racial slurs and discriminated against in job assignments, discipline, pay and promotion.” It’s not often you see formal allegations of not just discrimination, but also outright segregation at one of the most valuable companies in the world.

Yet putting aside the Tesla question, it’s clear that ESG investing has shortcomings and inconsistencies.

Index makers have jumped on the ESG investing frenzy to create a raft of new products they can market to clients who want to better align their portfolios with their values. But many have been making up the rules as they go. Oversight from regulators remains scant.

That leads to baffling outcomes based on convoluted ranking systems. ExxonMobil is now one of the biggest constituents of the S&P 500 ESG index. And here, Musk has a point: Why does a massive oil and gas company hold that spot when it’s earning billions of dollars every quarter producing fossil fuels, while an electric vehicle maker is screened out? Does that really make sense?

The-CNN-Wire™ & © 2022 Cable News Network, Inc., a WarnerMedia Company. All rights reserved.