If you assume (as many do) there is a relationship between the stock price and the profits of the company, then corporate taxation serves to reduce profits, reducing the stock price. So, instead of rising to $500, it may have risen to $750. The forgone (and invisible) $5 million of appreciation was the loss due to corporate taxation.
(Obviously, the above is too simplistic to actually rely upon, but that's how corporate taxes reduce investor returns, effectively resulting in double taxation in many people's mind, including my own. I still believe that's part of the reason LTCG are and should be taxed at a lower rate than ordinary income.)
I can see how this can work, for a stable domestic company that's not reinvesting its profits, but don't both foreign earnings (which affect the stock price but are not taxed by the US) and profit reinvestment defeat that whole idea?
Stock prices are also influenced by supply & demand. The situation you describe works for just one company paying no corporation tax, but if every company suddenly has no corporation tax, every company's profits increase, so relative demand should stay the same, leaving prices the same.
Stocks can pay dividends which are a direct result of their profits, and so the corporate tax rate effects the amount of actual money that gets paid out. Stocks that don't pay dividends are an interesting case, that is the investors allow the company to reinvest their earnings for growth with the expectation of future dividends.
(Obviously, the above is too simplistic to actually rely upon, but that's how corporate taxes reduce investor returns, effectively resulting in double taxation in many people's mind, including my own. I still believe that's part of the reason LTCG are and should be taxed at a lower rate than ordinary income.)