Personally, at a high level, I don't like the tax code being used to change behavior. I would rather it just be used to tax. Granted, taxes always change behavior, but I think we can understand what I am saying.
When you use the tax code to alter behavior, it benefits the rich or the largest companies more than the poor or the smallest companies, because the rich/large companies can hire the people to find the tax breaks.
But, I get it. It works. Which is why they do it. Indeed, you could argue that those companies are doing exactly what the government wants them to do. They obviously got tax deductions/credits/whatever by doing something that the government wanted to motivate them to do. So, the fact that they pay no taxes could be evidence that great things are happening!
But, we can't really tell if the societal investment (the tax breaks) were worth it to get those "great things." If the government just gave out the money directly, there would be a huge public debate about whether it was worth it to give out X amount of money to the companies to get them to do whatever those "great things" are. And, that debate would be a good thing. Transparency would be enhanced. Everyone would know that the government paid Apple for its solar panels, or funded jobs for Google, or whatever. But, no one debates hidden tax breaks that are snuck into a statute by lobbying groups...or if they do, their eyes glaze over, and Congress gets away with it (likely making themselves millionaires in the process).