Because Tesla sells these credits, they completely negate any environmental benefit from buying one, and always have. Any Tesla you buy just allows another automaker to sell a huge gas guzzler that they otherwise would not have been able to. As a bonus, selling them discourages other automakers to make EVs. Tesla can stall the EV programs of competitors by selling them these credits. They are contrary to Tesla’s mission statement, and if Tesla cared about the environment, they would keep the credits and not sell them: forcing the world to move to EVs faster.
The fact that these credits are going away is a really bad thing, but let’s not pretend there is any environmental benefit to buying a Tesla. Once the credits are gone there will be, but not now.