I was using a simplified example that ignores deductions. You're right of course.
But that doesn't change the fundamental relationship between taxing profit and investment.
Even if all reinvestment is made tax deductible, a tax on profits still reduces the incentive for individuals to invest in corporations, since all investment decisions are based on ROI projections, and with higher taxes on profits, ROI declines.
Moreover, sometimes it is more effective to sit on profits, and wait for a good opportunity to appear, and taxing all accumulated profits creates an incentive to not do that.