Government has a role in helping a new technology reach economies of scale. It's silly and counterproductive to assume otherwise, and that the market will always pick an eventual winner - even if it remains unprofitable in the near term. Yes, sometimes the government acts too early, and things don't pan out. But even the things that didn't pan out in this case helped lead to the ones that did.
And in the face of the threat of global warming (yes, a little over-hyped, but nonetheless real for the future - and having substantial effects in the present), the re is a need for government intervention to identify and support a technologies that will eventually need to scale. Mandates are always a tricky proposition in a democracy, but the Biden era energy policies were more carrot than stick - even though most experts agree that some sticks (e.g. carbon emissions tax) would produce quicker results.
Some credit is due to Elon Musk - that asshole visionary, for figuring out a way withing American macho car culture to make EV's cool. But, beyond shepherding in the concept of EV's a luxury status items, he's still mostly a carnival barker specializing stock market ponzi schemes. Of course, that probably wasn't motivating him until he saw how hype could boost Tesla to a 'valuation' higher than the top car companies combined.