Your comment suggests that reinvested cash is being "hidden" as expenses, but in reality, these reinvestments are usually recorded as capital expenditures (CapEx) rather than operating expenses (OpEx), depending on the nature of the investment. While CapEx can be depreciated over time, it is not typically expensed immediately in the way operating costs are.
The implication that companies can completely avoid taxes by reinvesting is misleading. Even though reinvestments may reduce taxable income through depreciation or other deductions, this is a legal and common accounting practice, not necessarily an attempt to "hide" profits. There are also tax laws in many jurisdictions which limit the extent to which such deductions can offset income.
Your understanding also conflates profit with cash flow. Profit is an accounting concept that reflects the net income after all expenses (including taxes). Cash flow, on the other hand, reflects the actual cash generated by the business. Reinvesting profits does not "hide" cash flow but rather allocates it to future growth.
Companies don't simply choose between declaring profit and reinvesting to avoid taxes. The decision to reinvest is often driven by strategic goals, such as expanding operations, developing new products, or acquiring other businesses.
Reinvestment reduces the company's taxable income and thus the taxes owed, but it does not eliminate taxes or "hide" the profits. The company benefits from reinvesting by potentially generating more revenue in the future from the new product, which should generate more tax revenue down the road instead of restricting growth now.
Here is an approximation of your comment translated from accounting into software development, minus the part where you misunderstand essential terms:
> It’s ridiculous that software developers waste so much time writing tests for their code. If the code is written correctly in the first place, you wouldn’t need tests at all. Instead of wasting time on tests, developers should focus on just writing perfect code from the start. It’s clear that the whole idea of ‘unit testing’ is just a way for developers to justify their jobs and take longer to finish projects. Shouldn’t we just hire better developers who don’t need to write tests?