If a corporation has profit, and doesn't pay dividends, then the income is taxed at the corporate rate, so they're not avoiding the tax. And even if you got rid of corporate income tax, this income would be better captured as a VAT, which negates any of the antics used to move corporate income around after the fact. Also, share prices are typically higher when a corporation pays dividends and lower when they don't. You see this all the time when stocks suspend or re-instate dividends.
Corporate profits are taxed the same with or without dividends, so obviously it's untrue to suggest that a company decision not to pay dividends doesn't reduce tax take.
Share prices are typically lower when firms suspend dividend payments due to financial issues. But ceteris paribus, a firm with a $100b pile of cash has a higher share price than one that disbursed that cash to shareholders. It's now quite fashionable to not pay dividends at all (even though the company is valued based entirely on the net present value of the future dividends investors believe it could pay) and to use alternatives like buybacks if they to return money to shareholders. Why do this? Because the different tax treatment generally favours shareholders.