Giving money to specific companies isn't the issue; subsidies and grants are important tools for all governments. Taking a stake in the company in return is the problem. They're setting things up so that the government benefits not from the success of the industry, but from the success of the company -- regardless of the success of the overall industry. From now on, all investors are going to believe its much less likely for those specific companies to really struggle, and much more likely for those companies to get lucrative government contracts and tax breaks. This gives them a huge advantage and stifles competition, promoting monopolies. This magnifies the problem, since the likelihood of the government breaking apart a monopoly it directly profits from is rather slim.
Also, it's essentially taxing the same company twice (directly through the owned shares and indirectly through taxes), meaning the companies are paying the government for the privileges noted above.
Again, this is a problem because of the capitalist framework. If we allow ourselves to flex into other approaches where appropriate, that allows for added oversight of both the company and the government's role and action directed toward national interests which ameliorate the downsides substantially. But we aren't doing that. We're taking a financial stake and then trying to pretend that nothing has changed. It's bonkers, it gooses markets in the short term, and it adds considerable liability and instability to our economic system in the longer term.