On the other hand, when the rate of taxation on capital gains is lower than the rate of taxation on corporate dividends, it's advantageous to pay out surplus cash in the form of capital gains by executing a share buyback. This also provides a tax-planning benefit to shareholders: Everybody is forced to realize a dividend (and pay tax on it) but some shareholders will prefer to realize more or less capital gains in a given year.
In Canada we have rules which sometimes reclassify capital gains as "deemed dividends" to prevent this sort of maneuver. A far better solution would be to simply fix the tax system so that economically equivalent actions get taxed identically in the first place.