The reason why Tesla is able to pay the Dept of Energy loan early is because of a secondary stock and bonds offering worth about >850+ million. In another words, Tesla is raising funds by generating more debt (from bondholders) and diluting share value (from shareholders), roughly about 3.5 mil out of 40 mil float, and using that money to pay the US govt. TSLA rose on the news despite diluting shareholders is because…
It was a capitalist regulation in California designed to provide financial incentives and produce more revenue for innovative green companies. Companies have the option to develop their own green cars, buy credits, or else cede the California market to competitors. Those incentives have been very successful. There are far more new models of low and zero emissions vehicles than ever before.
Remember the popular Saturn EV-1 from fifteen years ago? It and other green vehicles were killed because California removed its regulations mandating production of low emissions vehicles.