My problem is more why is government funding needed for companies to invest into this research instead of them investing their earnings into that research
It's a startup. They have no earnings, because they have no product. They need investment in order to refine the technology to the point where it can be used in products. Only
then will they actually have revenues.
Venture capital firms don't like to invest in basic research, which makes technology development hard to do. That's when it makes sense to have things like government grants. In some cases, government-backed loans make sense, which are a better & cheaper option for the taxpayer.
It's almost like the government money is being funneled to those same shareholders/ investors.
If government grants are helping either develop an industry or avoid being at the mercy of having it be controlled by a foreign government, then the return-on-investment makes sense. That's definitely what spurred CHIPS, as too much of the semiconductor supply chain was concentrating in East Asia.
We're agreed that government shouldn't generally be throwing money at companies and industries that are non-strategic or already profitable on their own. When I say "throwing money", I include tax breaks, which is an easily-overlooked form of government spending and currently benefits many industries that don't really need it.