To get them built. Electric cars are only viable if people can use them on the same infastructure, in roughly the same way as gasoline cars. A core part of that is a expansive and reliable charging network that spans the nation.
It doesnt need to be "gas stations" anymore, but they need to be as convenient, at least in their own way.
It's common, and arguably one of the most useful parts of goverment, that highly positive but fiscally negative projects will be "seeded" for a number of years with goverment money. This happened with electrication, telecom, internet access, etc. Goverment subsidies the intial infrastructure for profit to occur, and then profit motives take over and the government can end its investment. In this way, the goverment can shift the nation in positive directions, improving its citizens lives. This fucks up at times (see hundreds of billions in broadband investments and the glacial or non existent improvements), but is largely a sound idea.
Thats why Bidens IRA pushed so much money into various green tech, including charging infastructure. If the chargers are there, it solves a core EV adoption problem, which spurs green car tech forward.