Everything you've said here is totally reasonable. The problem is that policy is ultimately a matter of preference. Elon Musk's endeavors are aided by decades of taxpayer funded activities. As you point out, much of the technology leveraged by the private sector for profit has origins in completely unrelated, tax funded technology efforts. The roads Amazon uses to ship good were paid for by taxpayers.
The purpose of government funded infrastructure like this is to grease demand, to jumpstart something. So again, it's fine to debate the value of this specific effort. Perhaps it's a total waste of money (I really have no opinion on this). On the other hand, perhaps it jumpstarts an EV revolution and we look back in 30 years and talk about how beneficial the policy was. To your earlier point, we don't know what the future holds. We don't know if this is a good investment or not. I mean, we spend like $700b per year on defense. We need to take our national infrastructure as seriously as we take our national defense.